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

Analytics
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
star_border
Reply

Google Analytics multiple counting

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,

 

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

 

var _gaq = _gaq || [];

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

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

_gaq.push(['_trackPageview']);

_gaq.push(['_trackPageLoadTime']);

 

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

})();

 

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

    pageTracker._initData();

    pageTracker._trackPageview();

 

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

 

regards,

Equitymaster tech team

1 Expert replyverified_user

Google Analytics multiple counting

Top Contributor
# 2
Top Contributor

Hi,

 

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.