Skip to content

Instantly share code, notes, and snippets.

@mklabs
Created November 6, 2010 13:27
Show Gist options
  • Select an option

  • Save mklabs/665423 to your computer and use it in GitHub Desktop.

Select an option

Save mklabs/665423 to your computer and use it in GitHub Desktop.
<!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet
change the UA-XXXXX-X to be your site's ID -->
<script>
var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment