Created
December 24, 2011 00:27
-
-
Save cbcwebdev/1515779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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 | |
_gaq.push(['_trackPageview']); | |
// self executing function | |
(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') + '.google-analytics.com/ga.js'; | |
// 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); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment