Shoora
12/24/2014 - 12:56 AM

Google Analytic's async loader modified to be even more async using jQuery

Google Analytic's async loader modified to be even more async using jQuery

<!--
  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>