Google Analytics Javascript


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

async loading


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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.