Skip to content

Instantly share code, notes, and snippets.

@jonnott
Last active October 5, 2015 21:48
Show Gist options
  • Save jonnott/2882210 to your computer and use it in GitHub Desktop.
Save jonnott/2882210 to your computer and use it in GitHub Desktop.
shorthand async google analytics code
var _gaq=[['_setAccount','UA-XXXXXX-X'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment