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:
- Create a Google Analytics Account
- 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.
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.
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:
ga('create', 'UA-12345678-1', 'auto');
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.
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:
- Install some basic plugins
- Google Search Console set up (make sure Google notices our site)
- Look for a Theme that makes our look&feel more appealing
- Promote your blog and drive some traffic
Thanks for reading, please leave your comments!!