Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<script type="text/javascript">
// protect against multiple google analytics instances
var _gaq = _gaq || [];
// inform google whose account is being used
_gaq.push(['_setAccount', 'UA-27464642-1']);
// inform google to track a pageview on this page
// self executing function
// build a <script> tag on the fly
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
// insert the google analytics script right before the first script element on the page
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment