Adding Google Analytics to Blogger or WordPress

Todays post will show you how to instal Google Analytics. It’s a really important part of blogging which is often overlooked, but even if you aren’t interested in stats or monetising your site I recommend setting up Google Analytics asap to start collecting data right away.

I especially love the Real-Time Feature that lets you see whats happening live on your blog. Check out my beginners guide to Google Analytics to learn how to use it and what stats to keep an eye on as well as this post which will give you an overview of the dashboard and different reports available.

If you are having trouble finding code in Blogger, check out this post with instructions on using the new HTML editor.

Step 1: Setting up Google Analytics

1. You’ll need a Google Account for Google Analytics. You can sign up here if you don’t have one. If you use Blogger, Youtube or Gmail then you already have one.

2. Visit google.com/analytics and click sign in. Login using your Google Account and you’ll see a screen explaining Google Analytics. Click sign up.

how to sign up to GOOGLE ANALYTICS

3. Fill in your details in the form. Don’t worry about Industry Category. The choice doesn’t affect tracking and data collection, it just helps Google tailor the service to you.

how to sign up and create an account on GOOGLE ANALYTICS

4. Click Get Tracking ID, Accept the Terms and you’ll be brought to this page.

how to sign up and create an account on GOOGLE ANALYTICS

5. The tracking id is what gathers the data and sends it back to Google Analytics so it needs to be installed properly.

Step 2: Install Google Analytics to your Blog

Below are 3 methods you can choose from depending on how you want to add the script and what platform you are on.

Blogger Method 1: Tracking ID Settings
Blogger have made it really easy to add Google Analytics for those who would rather not mess around with code.

6a. From the area above in step 4, copy your Tracking ID number (UA-00000000-0). If you are using a Blogger template, go to Settings > Other and enter your Tracking ID number to the last section called Analytics Web Property ID and save settings. It may take 24hours for any data to appear.

google-analytics

6b. We’ll double check that the corresponding code is in your template. To do this go to Template > Edit HTML and between </b:template-skin> and </head> you should see the following code. If you don’t then add the following code above </head> and save.

<b:include data='blog' name='google-analytics'/>

Blogger Method 2: Manually using Script
If you’d rather go the manually way and add the code yourself, then follow this section.

7a. From the area above in step 4, copy your Tracking Code (the script).

7b. On Blogger, go to Template > Edit HTML > Search for </head>. Just above </head> paste the Tracking Code and click Save Template. Make sure to copy and paste the code exactly. It may take 24hours for any data to appear.

Adding GA on WordPress
For Self Hosted WordPress users, you can use a plugin to add your Tracking ID or add the Tracking Code directly to your themes header.php file.

Google Analytics – Frequently Asked Questions

Q. Do I need to add the script to every page or post on my blog?
No, don’t add the script to pages or posts. Add it to your template in the correct area. It will automatically be on every page on your blog because of that and will collect data.

Q: How do I enable demographic reports on Google Analytics?
The tutorial here will show you how to update your GA code to allow demographic data.

Q: Why not use Blogger Stats instead?
Blogger Stats count your own views, spiders that crawl your site for indexing purposes and spam bots. Google Analytics is more accurate and very useful for keeping an eye on all the data and stats you need for your blog. Plus, it’s whats universally used and more than likely it’s what PR and advertisers will look for when deciding whether or not to work with you.

Q: What about WordPress Stats & Jetpack plugin?
The figures shown on wordpress.com stats or on the Jetpack plugin are known to be pretty accurate. It may not have as many features as Google Analytics but it’s perfect for finding out just what you need to know on a daily basis.

Q: How do I use Google Analytics?
The following posts will explain the dashboard, data and reports on Google Analytics, and what stats to look at as a blogger.

Post last updated:

11 responses to “Adding Google Analytics to Blogger or WordPress”

  1. I’ve searched for head but it’s not finding anything?

    1. The new blogger html interface can be glitchy. Click into the box and then try searching for it. This post may help you understand it’s location http://xomisse.com/understanding-css-in-blogger/ hope that helps ๐Ÿ™‚ x

  2. Will this work for WordPress blogs or is it just something for Blogger?
    Thanks! x

    1. It will work for wordpress.org (self-hosted) blogs but unfortunately you cannot add it to WordPress.com as you do not have access to the code. It is something that people complain about all the time and I do not understand why they haven’t added it to an update. However, the stats on WordPress.com are fairly good too, you can read about them here http://en.support.wordpress.com/stats/#additional-info

      1. Amazing, thanks for the info! ๐Ÿ™‚

  3. Hi Ms. Ellie,

    I stumbled on your blog through bloglovin, I’m a newbie on blogging technicalities and I just started to post blog content yesterday, I want to track my blog’s page views too, however,I am using weebly and I am not sure if google analytics supports it?Thanks! ๐Ÿ™‚

    1. Hello, yes you’ll find instructions for that here.

  4. Thankyou so much!! I thought I had installed it properly and I hadn’t! OOPS! Hopefully my figures are right now!! ๐Ÿ™‚ xx

    1. No problem Olivia, hope it’s working for you now ๐Ÿ™‚

  5. The first time I set up Google analytics I believe that I set it up wrong. Is it possible to delete it so that I can start from scratch with your instructions?

    1. Eleanor Mayc

      Oops, just spotted the instructions for that. Fingers crossed it will work this time; thank you!

Join over 1,000 creators and small biz owners and be part of The Roundup

Ready to build your website, grow your audience and monetise your platforms? Receive the latest WordPress news, social media updates, SEO tips and industry insights straight to your inbox.

By signing up youโ€™ll receive our fortnightly newsletter and free resources. No spam or unnecessary emails. You can unsubscribe at any time.