1. You need to create one account on http://www.google.com/analytics/ and provide your application URL and other details.
2. Once you create account, it provides you unique tracking id. (Tracking is with some code as similar given below). Copy that code, then paste it onto every page you want to track immediately before the closing tag.
2. Once you create account, it provides you unique tracking id. (Tracking is with some code as similar given below). Copy that code, then paste it onto every page you want to track immediately before the closing tag.
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29620831-1']);
_gaq.push(['_trackPageview']);
_gaq.push(['_setAccount', 'UA-29620831-1']);
_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);
})();
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);
})();
3. After that you can track access count of web pages in your Google analytics account.
No comments:
Post a Comment