Adding Google Analytics To A WordPress Blog

When setting up a WordPress blog, it’s essential that you find a way to monitor the traffic coming to your site. If you know where the visitors are coming from, then you can manage your traffic startegies better.
One of the best traffic analytics systems around is Google Analytics. It’s free, and is very easy to use. Here’s a step-by-step guide to installing and using it.

Before starting, make sure that you are logged in to a gmail account, or one linked to Google. If you don’t have a gmail account I would strongly suggest you sign up for one, or at least link one of your existing email accounts to google.

Open your browser of choice and go to Google Analytics sign up page and click on “Sign Up”
As long as you are logged in to a Google account, this should sign you up immediately.
On the next page you start to add the website details of the site(s) you want to track.
Fill in all the details of your site, then scroll to the bottom and click on “Get Tracking ID”
Straight Talk For Success

On the next page you will find your tracking code. Now don’t be afraid of this page, it may look complicated, but we only need a bit of the information on it. You will need to scroll down and copy all of the tracking code

copy analytics code

Make sure that you leave the analytics window open, as we’re going to be going back to it later.

So, now you have your tracking code, but what do you do with it next?
Now we have to add the code into your wordpress blog. There are many ways to do this, but the easiest way I have found is using a plugin. One I have found that is easy to use is Insert Header and Footer. This will put the code in exactly the right place for you, so you don’t have to mess around editing any code.
To install the plugin, go to “Plugins” – “Add new”, type in the name of the plugin, in this case “insert header and footer” and press enter. it should come up either first or second on the next page. Click on “Install Now”, and on the next page, click on “Activate Plugin”
actvate plugin

With the plugin now activated, you can access it by going to “Settings”, “Insert header and Footer”

insert header and footer

Now you need to go back to the analytics page. I told you we would be going back, didn’t I? 😉
Highlight all of the code in the box and copy it.

Go back to your blog, paste the code in the “Scripts in Header” box, and then click “save”

paste analytics code

And that’s it, you now have Google Analytics tracking every visitor to your site!

Be sure to leave it for 12-24 hours before looking at your analytics, as it can take that long for data to be collected and displayed.

In my next tutorial I will be showing you How To Add More Websites To Your Google Analytics

5 thoughts on “Adding Google Analytics To A WordPress Blog

  1. Hi Keith. I used that plug-in as well but for mine to work I had to paste it into the footer for some reason. Maybe it is the theme I am using. Anyway, if anyone is having the same issue putting it in the header section of the plug-in, try putting it in the footer section instead and see if it works.

    1. Yeah, occasionally a theme doesn’t use the header on every page, so putting it in the footer fixes that 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.