Loading...
 
Skip to main content

Features / Usability


Google Analytics

Hi,

My site has gone live a few days ago but nothing shows up on Google Analytics, so I want to know if I've implemented it right. I'm using version 3.5.

The code Google gave me is

Copy the following code, then paste it onto every page you want to track immediately before the closing tag.

Copy to clipboard
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();


I've implemented it by putting this in my custom end of code in "Look and Feel"

Copy to clipboard
{wiki}{literal}{GOOGLEANALYTICS(account=XXXXXXXX-X) /}{/literal}{/wiki}


(Obviously my real code is in place of the XXX's )

When I look in my page source, there's no sign of my analytics code or anything else to do with Google, and the Analytics software at Google can't see it.

Have I done something wrong here?

Cheers...

Where do I clear the cache? Sorry if that's a stupid question.

If I just copy / paste the Google code, where do I copy it to? Just into the "Custom end of code" section same as the plugin? I know on previous versions you had to edit the header or footer .tpl files. Thanks for the reply Rick.


Do you mean just paste the code directly into the custom end of code box? No "Literal" tags or anything around them? I've tried that but it doesn't seem to make any difference 😑

The Google code is an updated asynchronous version, which they recommend be put into the header just before the closing "head" tag. I've copied all the code into the very end of header.tpl, surrounded by the "literla" tags, and all seems well. Maybe this need to be put into the documentation. Thanks guys.