Add Google Analytics to your WordPress blog

August 28th, 2006 Da Vinci

Google 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:

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.


3 Responses to “Add Google Analytics to your WordPress blog”

  1. Des Walsh Says:

    Thanks for the plain English explanation. Very helpful. Now I just have to wait and see if it works! :)

  2. Alex Says:

    Thank You

  3. Ivan Teoh » Blog Archive » Add Google Analytics Tool to WordPress Says:

    [...] Add Google Analytics to your WordPress blog [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>