Skip to content

Instantly share code, notes, and snippets.

@TexRx
Created April 24, 2015 18:15
Show Gist options
  • Save TexRx/815237819114b0a11256 to your computer and use it in GitHub Desktop.
Save TexRx/815237819114b0a11256 to your computer and use it in GitHub Desktop.
Update Google Analytics (Universal) async script example

Latest updated version:

<script>
  ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
  ga('create','UA-XXXX-Y','auto');ga('send','pageview')
</script>
<script src="https://www.google-analytics.com/analytics.js" async defer></script>

Which was taken from the HTML5 Boilerplate repo commit by Mathias Bynens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment