-
-
Save Shoora/8232f60c755bab60351c to your computer and use it in GitHub Desktop.
Google Analytic's async loader modified to be even more async using jQuery
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
<!-- | |
Google Analytic's async loader modified to be even more async | |
using jQuery | |
http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html | |
--> | |
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-xxxxx-x']); | |
_gaq.push(['_trackPageview']); | |
$(window).load(function() { | |
var ga_src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
$.ajax({ cache: true, dataType: "script", url: ga_src }); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment