High bounce rate (99%) when installing two Google Analytics trackers

I have one Google Analytics tracker (pageTracker) installed on my website. I want to install the second Google Analytics tracker (pageTracker2) so that I can send data to another account. To test all this, I installed pageTracker2 on only one page: my popup page.

When I go to Google Analytics and look at the data for this pop-up page in Account 1 , the time on the page is reasonable (~ 2 minutes), but the bounce rate is very high; 99.54% compared to 30% before I installed pageTracker2).

In Account 2 , the same thing. Time on page is reasonable (~ 2 min), but bounce rate is very high; 99.98%. For account 2, I assume the bounce rate is inaccurate because I did not install pageTracker2 on my website, so that makes sense.

The problem is in account 1. Why does the bounce rate increase to ~ 99% when I install the second tracker (pageTracker2)? The code for the splash page follows:

<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("UA-ACCOUNT-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>    
<script type="text/javascript">
try{
var pageTracker2 = _gat._getTracker("UA-ACCOUNT-2");
pageTracker2._setDomainName(".mydomain.com");
pageTracker2._trackPageview();
} catch(err) {}
</script>
+3
source share
2 answers

Google tells you not to install two trackers on the same page, as this can lead to inconsistencies ... There you have them.

, : http://www.google.com/support/forum/p/Google+Analytics/thread?tid=4731d8a407382376&hl=en

+4

:

<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">
try{
var pageTracker = _gat._getTracker("UA-ACCOUNT-1");
pageTracker._trackPageview();
var pageTracker2 = _gat._getTracker("UA-ACCOUNT-2");
pageTracker2._setDomainName(".mydomain.com");
pageTracker2._trackPageview();
} catch(err) {}
</script>
0

Source: https://habr.com/ru/post/1721309/


All Articles