Google's New Analytics Code
Recently, Google updated the javascript code used to track your pages for analysis. The former version was either the secure version or the non-secure version. Now, it's both - which is nice.
There are two bits to the code and here they are:
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._initData();
pageTracker._trackPageview();
</script>
You must add your Google Analytics ID to the second block where indicated by the "UA-XXXXXX-X"
neoverve
Subscribe to the feed for this blog