Page 2 of 2

Re: 023 - Create a module to embed Google Analytics into Joomla! v 1.5.

Posted: Mon Jan 07, 2008 10:32 pm
by neonkoala
AmyStephen wrote: I see what I did.  :-[

I downloaded your zip file - and then installed a zip file named mod_analytics.zip already on my desktop from Nick Dawson from v 1.0.x.
Just so you know it is a v1.5.0 module, I made it as I was aiming to make a non-legacy site.

:) Nick

Re: 023 - Create a module to embed Google Analytics into Joomla! v 1.5.

Posted: Mon Jan 07, 2008 10:35 pm
by AmyStephen
Nick -

kilps extension has nothing to do with yours. It was my mistake.

Thanks!
Amy :)

Re: 023 - Create a module to embed Google Analytics into Joomla! v 1.5.

Posted: Fri Jan 11, 2008 6:47 pm
by wes_517
hit a bit of a snag in trying to do a reinstall to fix the '; part on my site.

when i uninstalled then reinstalled the module I saw these errors.

it looks like it did install, but I wanted to let you know.

Re: 023 - Create a module to embed Google Analytics into Joomla!

Posted: Sat Apr 12, 2008 8:23 pm
by joncz
I modified the original code to use the new ga.js analytics code. Backup your default.php file in the modules/mod_googleanalytics/tmpl directory and replace with the following code:

Code: Select all

<?php // no direct access
defined( '_JEXEC' ) or die( 'Restricted access' ); ?>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("<?php echo $uacct; ?>");
pageTracker._initData();
pageTracker._trackPageview(<?php echo $title; ?>);
</script>
This version renders the Use SSL parameter moot as the new analytics script detects whether each page was loaded with HTTPS and uses the appropriate call accordingly.

I also retained the $title usage, though in my experience, it's not exceptionally useful as it was implemented.