Search This Blog

Tuesday 13 July 2010

Adding Google Analytics code to Blogger site

Add the url to analytics and cut and paste the script.

Login to your blog and from the main page click 'design' | 'edit HTML'.  Search the text for /body and insert your code just above it.


Before the final /body tag


</table>
<br clear="all" />
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17416825-2']);
  _gaq.push(['_trackPageview']);
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
</body>
</html>

No comments:

Post a Comment