Add Google Analytics to your WordPress blog
August 28th, 2006Google Analytics is arguably the best free Web analytics tool available. It’s free and they have now made it available to everyone. To sign up go to google.com/analytics and login using your Google account info. After creating an account you will be guided through the steps to set up your first profile. Copy the tracking code or keep it close for the next step.
There are two ways to add the tracking code to your WordPress blog: 1) by installing a plug-in and 2) by editing the theme source pages directly.
Install a Google Analytics plug-in.
There are a number of plug-ins available for free and they are mostly similar and very easy to use, including:
- Google Analyticator
- Boakes Google Analytics Plugin for Wordpress
- Semiologic Google analytics plugin for WordPress
- OraTransplant - Ultimate Google Analytics plugin for WordPress
Edit your WordPress pages directly.
This is probably the no so smart option, but since I did it I might as well mention it. You will need to edit the source of your theme pages. Login to your WordPress admin tool, select the Presentation tab and then Theme Editor. The Header (header.php) or Footer (footer.php) is normally the best place to insert your Google Analytics code, but make sure that you insert it after the <body> tag in the Header or before the </body> tag in the Footer, depending on which file you inserted the code. After saving the file, preview your blog and view the page source to verify that the tracking code has been inserted. Google Analytics can can lag a few hours to show traffic.

April 13th, 2007 at 12:38 am
Thanks for the plain English explanation. Very helpful. Now I just have to wait and see if it works!
April 25th, 2007 at 10:48 am
Thank You
August 30th, 2008 at 5:00 am
[...] Add Google Analytics to your WordPress blog [...]