How to set more Google Analytics accounts to watch one site?

 

 

Do you need to watch Google Analytics website’s statistics on more accounts? One account for administrator and another for website owner?

You cannot just put two codes at the end of webpage – it doesn’t work. Here is the code which works:

<script type=”text/javascript”>
  var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-XXXXXXX-X’]);
_gaq.push([‘_trackPageview’]);
_gaq.push([‘t2._setAccount’, ‘UA-XXXXXXXX-X’]);
_gaq.push([‘t2._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);
  })();
</script>

Copy this text and change 2 Google Analytics account numbers in it and then place it to the end of your web page, just before </head> tag.

 

2018-11-19T12:18:24+00:00By |

Leave A Comment

16 + 5 =