Optimized Clicky asynchronous tracking code

  • Download Gist
Optimized Clicky Asynchronous Tracking Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/*
* See http://mathiasbynens.be/notes/async-analytics-snippet#comment-14
*/
 
<script>
var f = Function(),
clicky = { log: f, goal: f },
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>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.