Google analytics code


I have stopped using Google analytics. The code is however still on my webpages even though I cannot see it within ‘HTML Code - Head’ when I inspect the pages in Rapidweaver? Is it somewhere else or is it more persistent than that and do I have to remove it manually even after a republish?

If so is it the bit between the below script tags and what the best way to clean each page?

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-27779851-1']);

(function() {
    var ga = document.createElement('script');
    ga.type = 'text/javascript';
    ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(ga, s);

Cheers Nigel

You should not have to remove the code manually. Check to see if you were also loading the code via the page code section instead of the General project settings. Also, try in a private browser. The page might just be cached. Lastly, it’s possible that, if you’re embedded a product, it might be loading its own GA.

May be worth checking if you put the code in the Javascript Tab of the General settings or in the individual page code tabs rather than the ‘HTML Code - Head’ tab.

Hi Both!

Thank you. I found it - it was in the general settings ‘Head’ section.

I will republish and clean the code up now.


1 Like

Terrific! I’m glad you got it sorted. That sort of thing can definitely be discouraging.

I didn’t want any trackers or cookies on the website at all. Pleased they are gone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.