Before launching your blog, you should set-up Google Analytics.
Google Analytics is a free tool that enables you to analyze your web traffic. It provides you with audience insights and helps you track, measure and understand the actions and behaviours of visitors to your blog.
With analytics you can see:
- The number of visitors to your blog
- The geographical location of those visitors
- The posts/pages visitors view
- How long people stay on a post/page
- What platforms visitors come to your blog from – Facebook, Google, etc.
- Actions visitors perform – links they click, videos they watch, etc.
And much, much more.
Ultimately, Google Analytics enables you to make informed marketing decisions to help you build and grow your blog.
And, in this post, you will learn how to install it on WordPress.
How to Install Google Analytics
To install Google Analytics, you have to insert a snippet of tracking code into the HTML header section of your blog.
There are a few ways to do this.
You can hard-code the snippet, you can use a plugin, or you can use Google Tag Manager (GTM).
I recommend using Google Tag Manager, which is the method I will use in this tutorial because it makes it easier to implement tracking and measurements and offers enhanced analytics abilities, which you will want to avail of as your blog grows.
I created another post that walks you through the steps of installing tag manager – you can read that here – it takes less than 10 minutes to set-up. Once set-up, come back to this post.
There are two ways to continue through this tutorial. You can watch the video, which covers all the steps, or you can continue reading below.
Step 1 – Create a Google Analytics Account
After creating a tag manager account and adding the tag manager container to your blog the next step is to set-up a Google Analytics account and get a tracking ID. Use the same Gmail that you used for tag manager.
Sign-in To Google Analytics – When you login into to Google Analytics you will be presented with the below page to finish the account creation process.
Fill in Your Details – The next step is to fill in your account details and get the tracking code that you will place on your blog.
Enter the following info:
- What would you like to track? – Select Website
- Account Name – Enter your company or blog name
- Website Name – Enter blog name
- Website URL – Enter URL and choose between http:// or https://
- Industry – If your industry is not listed select “other.”
- Reporting Time Zone – Choose the country where the majority of your traffic will come from
– Then scroll to the bottom of the page, and press the “Get Tracking ID” button
– Next, accept the Terms of Service
Copy the Analytics ID – After accepting the T&Cs you will recieve your analytics tracking ID, copy this to a text or Word doc, you will need it shortly for one of the below steps.
Step 2 – Add Analytics Code to Your Blog with Tag Manager
Now, that you have your Google Analytics ID the next stage is to create a tag in Google Tag Manager, and then insert the analytics code into your blog.
There are a few steps in the process; however, they are super easy to follow.
From the Google Tag Manager dashboard:
– Click on the Container Name to navigate to the tag manager dashboard
– From the dashboard select the “Tags" tab
– Then select “New”
– Add a name for the tag (something like “GA All Pages Tracking Tag”)
– Click to choose a tag type
– Choose “Universal Analytics” as the tag type
– For the Track Type, choose “Page View” from the drop-down menu
– For Google Analytics Settings, choose “New Variable” from the drop-down menu
– Enter the name of the tag type (Something like "Google Analytics ID")
– Add your Tracking ID (the ID you previously copied to your text or word doc)
– For Cookie Domain – Leave as “auto”
– Press “Save”
– Choose a “Trigger”
A trigger is a rule that activates (Fires) the Google Analytics tracking code on your blog to collect user data.
You will set it to fire on "All Pages", which means that each time a page loads the tag fires.
– Click “All Pages”
– Press “Save”
After you press save the Google Analytics code is installed on your blog.
Step 3 – Confirm the Analytics Code is Installed
Before moving to the final step in the installation process, which is publishing the code live on your blog, you want to make sure the analytics code is firing (collecting data)
To do this, we use “Google Tag Manager Preview and De-bug mode”
– Click the “Preview” button to open Preview and Debug mode
– Once in preview mode you will see an orange workspace dashboard
– Then open your blog in a new browser tab
A “Summary” window should open where you will see a message that your Google Analytics tag has fired. You should see this on every page that you load.
Step 4 – Publish the Analytics Code
Now, that you have confirmed that analytic code is firing, the last step in the process is to publish the code live on your blog.
To do this.
– Exit "Preview Mode"
– Once you exit de-bug and preview mode – Press “Submit”
– Enter the name of Version ("Initial Google Analytics Pageviews Tag")
– Press “Publish”
Once you press publish, you will see a screen that says “Sing Like No One is Listening” after that the Google Analytics is live and ready to collect data from your blog visitors.
But, just one last thing!
Step 5 – Confirm Your Analytics Account is Receiving Data
You have already checked (in Preview and De-bug mode) that the analytics code is firing on your blog. But, to ensure all is working correctly, check your analytics account is collecting data.
To do this
– With your blog open in a browser tab, go to the Google Analytics platform
– Once inside, navigate the "Real-Time" tab, and click, then select
The real-time overview provides a snapshot of who is on your blog at that moment, the pages they are viewing, and other actions that are happening.
Once viewing in real-time you should see activity.
If everything is working correctly, you should see an active user on your blog from and your Google Analytics is collecting data and ready to analyse your traffic and provide you with actionable insights.
And That’s a Wrap…
Thanks for sticking with me. If you have followed along, Google Analytics should now be set-up on your blog. It can take up to 24hrs before you start seeing any data.
Now, that you have installed analytics, you can start learning some of the basic of the platform in this post here.
As always, should you have any questions, please feel free to hit me up in the comment section below.