Google Analytics integration for your WordPress blog

Once we have created our blog (read how to create a blog in 30 minutes for beginners), the next thing we want to know if there is real people out there reading what we write and Google Analytics has proven to be one of the best, easy and free solutions to this problem. I’m going to explain, step by step how to do a basic Google Analytics integration for your new WordPress blog.

Step by step:

  1. Create a Google Analytics Account
  2. Link Google Analytics with WordPress, 2 options:
    • Plugin “Insert headers and footers” or
    • Plugin “Google Analytics by Yoast”

1. Create a Google Analytics Account

This is very simple, just go to Google Analytics and sign in using your current gmail account. Then click to register and set up your account.

google analytics sign in

google analytics register

Important concepts:

Account name: You can have multiple accounts (up to 100) so here’s the importance of the account name. This will be the highest level of hierarchy, for example, if you are setting up Google Analytics for first time because you’ve created a personal blog, you can name it “Personal Account” and under this account you will be able to have multiple properties. Don’t worry, below I explain what a property is.

Property configuration / Website name: Let’s say that next year you decide to create another blog with a different topic or an e-commerce website. They you will be able to group them all under the same Account, but with using different properties.

Then, why do I need more than one account name? Well, maybe you use Google Analytics at work, and you have access with your personal email. Also you may have another project together with someone else. You want to see a different account name for these. Google explains the account structure here.

URL: That one’s easy. :)

Time preferences: This is very important because if you choose a wrong timezone you can have serious problems when analyzing data. But don’t worry too much, you can change it afterwards.

google analytics account

Make sure you read and accept their Terms of Service and you’re done!

2. Link Google Analytics with WordPress

a. Plugin “Insert headers and footers”

Let’s go first to our brand new Google Analytics page. Right there, in the first page you will see your tracking code. If it is not there, you can find it under “Admin” (top menu), then select your account and property, and go to the .JS item under the property and click “tracking info”. You will have to copy a code that looks similar to this one:

Now go to your WordPress’ Plugins menu and find and install the “Headers and footers” plugin. That will allow you to manage your header and footer’s code. You will find this option under your WordPress “settings” menu.

The only thing we have to do now is paste your Google Analytics tracking code in the footer section. Done! we have integrated Google Analytics! Now be patient, sometimes it takes up to 24h to take effect.

b. Plugin “Google Analytics by Yoast”

Go directly to your WordPress’ Plugins menu and find and install the “Google Analytics by Yoast” plugin. Once you have it installed you just have to access the plugin settings and click “Authenticate with your Google account”. That will do everything for you! Easy right?

I personally had a problem with this option, it was trying to authenticate but nothing happened… I generally use Chrome, I switched to Firefox and it worked perfectly. Weird.

What else?

Well, I would recommend you to do this 2 free Google Analytics courses from Google Analytics Academy. Digital Analytics Fundamentals and Google Analytics Platform Principles.

I also recommend you to filter your IP from Google Analytics. This takes only 2 minutes. In your Google Analytics account you want to go Admin -> Under your view click “Filters”. Then in the filter type section select “exclude” in the first field, “traffic by IP” in the second field and “equals” in the third field. Now you just have to lookup your IP and enter it in the last field.

I hope this post has been useful for you! Now we have created a blog and we are able to track visits. That’s what you can expect from next posts:

Thanks for reading, please leave your comments!!

2 Comments

  1. Pingback: How to create a blog in 30 minutes (for beginners) - Raul Gonzalez blog

  2. Pingback: Basic plugins for your brand new WordPress blog - Raul Gonzalez blog

  3. Pingback: 8 basic plugins you MUST have on your WordPress blog - Raul Gonzalez blog

  4. Ester

    Hi!
    I already intalled analytics in my web!
    I didn’t filter the IP, that’s a good idea!
    I’ll also take a look to the courses you recomend…
    Thank you!

    1. Raul

      Hi Ester, I’ve just visited your blog. You’re doing a good job! I hope this experiment helped you at the beginning! I haven’t been posting for a while, I use the site mostly to experiment with Google Analytics, Google Tag Manager and other tools. Please let me know if I can help you by posting about something specific, I´ll be more than happy to have an excuse to post more content.

Leave a Reply

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