Double tracking google analytics


/ Published in: JavaScript
Save to your folder(s)

tracking web with double tracking code.


Copy this code and paste it in your HTML
  1. <script type="text/javascript">
  2. var _gaq = _gaq || [];
  3. _gaq.push(
  4. ['_setAccount', 'UA-XXXXXXXX-1'], ['_trackPageview'],
  5. ['b._setAccount', 'UA-XXXXXXXX-2'], ['b._trackPageview']
  6. );
  7.  
  8. (function() {
  9. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  10. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  11. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  12. })();
  13. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.