Cast for two

Thursday, December 20, 2007

Updated Analytics script ga.js works with Google blogger

Google provided an updated script to call the new javascript ga.js to enable to track usage of html pages with Google Analytics.

<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-xxxx-xx");
pageTracker._initData();
pageTracker._trackPageview();
</script>

I injected above code in to the template of this blog and everyting is now working fine. If you want to try it, Andy wrote an how to.

No comments: