Adding Google Analytics to Your WordPress Blog

It is very important that you track how many visitors your blog has, what pages the readers view, how long they stay on your site, etc. All these statistics and a lot, lot more are yours with free tracking and statistics system called Google Analytics.

If you don't have a Google Account already, go create one right now (you'll get access to GMail, Google Docs and much more with it). If you have a Google Account, but you haven't used Google Analytics yet, go set up Google Analytics account for yourself now.

Setting Up Google Analytics for WordPress Blog

The best way to add Google Analytics tracking code for your blog, is to use Google Analytics for WordPress -plugin.

Unless you have some very good reason, do not go editing your WordPress theme and add the tracking code manually. And even with that very good reason, think again, and just install this plugin.

You don't need to do anything else but

  • install the plugin and
  • add your Google Analytics Account ID to the plugin settings.

Everything else is in order by default (advanced settings are there for advanced users).

How to Install the Google Analytics for WordPress -plugin.

Installation and Activation

with the latest WordPress versions, 2.7.x and onwards, the plugin installation system simple and easy:

  1. go to the Plugins section,
  2. click “add new”,
  3. search for “Google Analytics for WordPress”
  4. click “install”
  5. activate the plugin after succesful install.

or you can install the plugin manually if you're running old version of WordPress:

  1. Download the plugin from the Google Analytics for WordPress at WordPress Plugin Directory
  2. Upload the plugin to the plugins -folder with ftp client, like FileZilla
  3. Activate the plugin from the plugins -page in WordPress dashboard

For detailed instructions, check the author's plugin page:

Google Analytics for WordPress -plugin Settings

The property ID you need for plugin settings can be seen inside Google Analytics after you've created website profile there. (Here's my tutorial for setting up Google Analytics account, if you need help with that):
Google Analytics property ID

Google Analytics for WordPress -plugin configuration

Insert the property ID to the plugin settings. Outgoing links and downloads are automatically tracked if you leave the option on.

Posted by

Topic: WordPress Plugins
Tags: , , , ,

If you enjoyed this post, sign up for updates (it's free)


Feedback, questions and comments are also welcome on my Facebook page