In order to add Google Analytics to Blogspot, sign in to your Blogspot account, click “template”, click “edit html”, check “expand widget templates”, scroll all the way down to somewhere in the middle, right after all the stylesheet code and before the </head>, paste the followings:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-AAAAAA-A']);
_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>
Replace UA-AAAAAA-A with your own Analytics ID.
No comments:
Post a Comment