This is a tutorial of adding google analytics for your wordpress, it is easy and free. every wordpress user can track his website under these steps.


1. Log in your Google account and open your access analytics services

Log in your google account, and then click this URL:

http://www.google.com/analytics/

Click Access Analytics, screen shot shown this:

2. Add a new domain profile or Select a existing domain

Click the link of Add Website Profile» in the Analytics Settings panel. If you are using google adsense or other services relate with your websites. You can select Add a profile for an existing domain, if not, please select Add a profile for a new domain.

Type your domain in the input box, and select the time zone country or territory from the selection, If your domain has existed in google, you can select from the other selection easily, then press Continue.

3. Get the tracking code

The code that has a blue background is just the tracking code, copy it surely.

4. Paste this code on your wordpress

But where should I place this tracking code? Well, just follow this:

  1. Download Your theme that you are using currently, which should be in wp-content/themes/xxxxx, xxxxx is your theme's name.
  2. Open the header.php file, and paste the tracking code before the closing </head> tag, Screen shot like this.
  3. Save header.php, and copy/paste or upload it to your website, and cover the original header.php file.
  4. Okay, please wait for about 2-24 hours for data to appear in google analytics account.

Addition 1: Tracking status introduction

There may be these three status under the column status:

  1. Waiting for Data – The tracking code has been detected on your website, Please waiting for the data appeared.
  2. Tracking Unknown or Not Verified – The tracking code has not been detected on the homepage of your website, please verify your code installed correctly.
  3. Receiving Data – all are working properly.

Website profiles screenshot shown this:

More Links: http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=174894

 

Addition 2: Why don't Google Analytics tracking my website?

Refer to: http://www.google.com/support/analytics/bin/answer.py?answer=57053