Skip to content

Instantly share code, notes, and snippets.

@robflaherty
Created April 20, 2010 22:43
Show Gist options
  • Save robflaherty/373179 to your computer and use it in GitHub Desktop.
Save robflaherty/373179 to your computer and use it in GitHub Desktop.
/*
* Inspired by (directly copied from) Mathias Bynens' optimized Google Analytics snippet
* http://mathiasbynens.be/notes/async-analytics-snippet
* Not fully tested, use at own risk!
*/
<script>
var clicky = { log: function(){ return; }, goal: function(){ return; }},
clicky_site_id = XXXXXX;
(function(d, t) {
var c = d.createElement(t),
s = d.getElementsByTagName(t)[0];
c.async = 1;
c.src = '//static.getclicky.com/js';
s.parentNode.insertBefore(c, s);
})(document, 'script');
</script>
<!-- This supports tracking for users with Javascript disabled. This should go in <body> -->
<noscript><img alt="" width="1" height="1" src="http://in.getclicky.com/XXXXXXns.gif" /></noscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment