Add Google analytics

I have seen the magic of google analytics multiple times, you will be amazed to see how many people from which part of the world are watching your pages and how much time they spend on them. I would like to rate GA as one on the best tools that google has created. Now let us leverage this tool for you. I will show step by step process to make google analytics work for you. The steps are simple to follow, plese do not get bogged by the code, it is just copy and paste at the right place on your webpages, you need not write even a single line of code.

Note: I will refer Google Analytics as GA in the following, please bear with me.


Get google account first

Sign up for a google analytics account. If you have a google account(Gmail) then you can directly login in to GA. Once you have logged in, you will be shown the main section. In the first login you will see no anlytics accounts in the landing page. In GA analytics account means the tracking website, suppose you want to track 3 websites then you need to create 3 analytics accounts or in simple terms 3 profiles. A single google ID can help you to track multiple websites at one time.

Step 1: Login to GA landing page, click on create a new analytics account, you will be taken to the analytics registration page.



Fill the above form and click on Continue.

Step 2: As soon you click Continue, you will be dispalyed with the GA code that you need to paste at the bottom of the page.

The code will look like this

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12226152-1");
} catch(err) {}</script>

Step 3: Paste the code that is given to you at the end of your page just above </body> as illustrated below


Your GA code comes here



Step 4: Now go and check the GA account and after few minutes you will see that GA starts tracking your web page.

See how simple it is to work with Google Analytics.
Post a Comment