Here’s a quick step-by-step guide to get Google Analytics into your nanoblogger installation.
Step 1: Get your Google Analytics JavaScript code. If you missed or skipped this step when you signed up you can replicate it if you log into your Analytics account, go to the overview page, and search for “UA”. Take the unique ID that looks like UA-0123456-7 and put it into this code (it’s the bold, italicized part):
<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">
try {
var pageTracker = _gat._getTracker("<strong><em>UA-0123456-7</em></strong>");
pageTracker._trackPageview();
} catch(err) {}</script>
If you don’t put your unique ID then you will not get any stats! Don’t use UA-0123456-7!
Step 2: Back up your site and templates. If you make a mistake in the next few steps you’ll thank yourself.
Step 3: Add the code in the following templates just before the