google analytics logo

How to integrate your WordPress Blog with Google analytics

google analytics logo

Websites and blogs are an integral part of our world today. Reasons may vary – an outlet for emotions, hobby, letting others know what’s going on in your mind, leveraging business, making money – but the platform remains the same – Blog. Gone are those days when people used to maintain a personal diary hoping no one will see it. Now most of us want to get out there and show them who we are, what we know and what we do.

Now comes the obvious question. Is your blog read by anybody? Is the world taking note of my thoughts? Did your clients check out your newly designed website? The answers to all these questions are bundled in a nutshell by Google – in a tool called Google Analytics.

 

So.. umm.. What exactly will it analyze?

Google Analytics is to your blog what Google Search is to your doubts. It will do all the background work for your blog/website and show you information you need the most in an elegant manner.
Google Analytics will solve the following queries for you:

  • Visitors : Number of visitors, their location, what language they speak, how often they visit your site and what computers and browsers they use to get there.
  • Source of traffic : You can track which sites link to your page or keywords people search to find you.
  • Content : Shows your most popular posts, number of clicks generated for each post or page.
  • Goals : Here you’ll find data about desired actions from users, including downloads, registrations and purchases.
Google Analytics Report

Sample google analytics report

 

This list will go on. You can have a look at detailed features of Analytics tool here. It is basically an analysis genie for your blog/website. The information is present on your dashboard.. you just have to choose what you want to see. Typical Google!

 

Awesome! Registration steps please.

1. Sign up for an account

Google analytics signup page

Sign Up Page

 

Go to the Google Analytics sign up page, and log in with your google account.You can also create an account if you do not have one. Once you log in, you can see an ID assigned to your account on the dashboard. This is your ‘Tracking ID’, which you will be using for tracking your blog.

google analytics tracking ID

Tracking ID

 

2. Set up account properties and profiles

 

google analytics property and profile

Property and Profile

 

You can setup your analytics account for a website or an app. Blog writers should select the website option. I will be guiding you only for the ‘website’ option here.
You will have to assign a ‘property’ to your account. A property refers to your website/blog. you can assign multiple properties to the same account. For example, if you associate 1 tracking ID with 2 websites, data for both websites appears in the same property. The raw data collected into this property can then be organized using account filters and profiles.
Now you need to attach a profile to your property. Profiles are the ways you want to view the data being generated – you can filter your data, separate the data for sub-domains  restrict the data coming from other Google products like Adwords and Adsense. Again, you can have multiple profiles within a single property.

Feeling confused? Check out this neat diagram to make sense of all the things:

Google analytics hierarchy

Hierarchy

 

3. Set up your tracking code

Once you are finished with the steps listed above, you will be able to see a piece of code in your ‘Admin‘ panel in the ‘Tracking Info‘ tab. You will have to copy this code and paste in your website/blog.

google analytics tracking code

Tracking code

 

Now in your wordpress account, go to Appearance -> Editor. You will see a page full of code with files listed on the right. Don’t panic.. you only have to edit one file out of them 🙂

Click on ‘Header.php‘ file. Go to the line of code showing ‘</head>’ in the head section of the file. Paste the google analytics code one line above the ‘</head>’ line. Check the image below:

wordpress header.php

header.php file

 

Save the settings and you are done! Congratulations.. you have successfully installed Google Analytics on your website! To confirm the installation – and to get your peace of mind – go to your Google Analytics account again, and check the status. It should now show ‘Analytics Installed’. Just give google about a day (24 hrs) to activate your data. The status in your account will change to ‘Receiving Data’ once the data tracking has started.

google analytics tracking status

Tracking Status

 

Now sit back, relax, and enjoy the view of the website traffic!
If you are getting any errors or you cannot see the data even after waiting for more than a day, you can always check with Google Analytics support team.

 

Do you have Google Analytics installed on your website/blog? Do you want some more insights on this awesome tool?

I will be posting a lot more on the in-depth usage of Google Analytics. Keep watching this space for more!

 

Image Credits : Google PlayGoogle support

Leave a Reply

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