AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

4.2K members online now
4.2K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Google Analytics multiple counting

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭



We had the following two codes on the homepage of our website.


var _gaq = _gaq || [];

_gaq.push(['_setAccount', 'UA-4311385-1']);

_gaq.push(['_setDomainName', '']);




(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);



var pageTracker = _gat._getTracker("UA-4311385-1");




Notice the two lines marked in bold. Will this result in the page getting tracked twice?



Equitymaster tech team

1 Expert replyverified_user

Google Analytics multiple counting

Top Contributor
# 2
Top Contributor



most likely yes. Also leads to double sessions and user count, if I'm not mistaken. I think this would be a perfect time to upgrade to the latest version and maybe start using Google Tag Manager too.

To make bad day worse, spend it wishing for the impossible

Antti Nylund, Google Analytics Top Contributor
Did my answer solve your issue? If yes, please mark it as the ‘Best Answer.’ Otherwise keep on asking.