How to use Google Analytics & Tag Manager to track virtually everything that happens on your blog
Here’s everything you need to know.
Google often gets a lot of criticism, generally, it’s for being a corporate overlord who is only interested in profits and not ethics. Whatever your political view may be, it is hard to deny that some of the free tools that they offer bloggers and webmasters are pretty amazing.
Google Search Console, for example, is a fantastic platform that allows you to easily track your blog’s rankings for specific search terms. You can also analyze, page by page, which search terms the blog ranks for, how many impressions your blog gets compared to how many clicks it gets. This allows you to experiment with different meta-titles and descriptions, to see how to increase your blog’s click-through rate. You can also expand your pages by analyzing which search terms you rank for but don’t have a specific blog post or article for.
The mother of all free blogging software, however, has to be Google Analytics. Launched back in November 2005, Google Analytics lets you see how many people visit your site, how they found your site and what they do once they’re on your site.
What is Google Analytics Event Tracking?
In order to see what visitors actually do during a visit to your blog, you will need to set up ‘event tracking’ in Google Analytics.
Event tracking allows you to add code to an element and record how and when people interact with it.
Some typical events that you may want to track include:
- Form Submissions
- Live Chat engagements
- Menu/navigation clicks
- Outbound link clicks
- Video interactions e.g. hitting the play button
What’s great, is that you don’t actually need to know any coding to implement event tracking, so no need to hire a developer. Everything in Google Analytics and Tag Manager can seem overwhelming to begin with, but it’s easy once you break everything down into a step by step process.
You will use code in some instances, for example when adding Google Analytics to your website but you will just need to copy and paste it – you don’t need to know what the code does.
How to Set Up Event Tracking
You can set up event tracking in Google Analytics – however doing it in Tag Manager is much easier – although it’s still a little long-winded – so allow yourself 30 minutes or so to follow along.
First things first, make sure you sign up to Google Analytics and Google Tag Manager – do this in Google Chrome if possible.
If you have a WordPress blog, using a free plugin like Monster Insights means that you typically just need to copy and paste the UA code from your Google Analytics tracking code – this will be presented to you once you have finished filling in your details during the sign up process. You can also find your UA code in the admin section of Google Analytics:
Admin>Property>Tracking Info>Tracking Code
Next, sign up to Google Tag Manager – ensuring that you use the same account that you used to sign up to Analytics with.
Once you have created an account in Tag Manager, you will need to create a “Container” for your blog.
Name it the same as your blog’s address – i.e. Yourblog.com and then choose “Web” as the place to use your container and then hit the “Create” button.
Next you will be presented with your Tag Manager workspace dashboard, as shown below.
To create your first piece of event-tracking, click Triggers>New Trigger:
The first time that you use Tag Manger you will need to create a “generic click trigger”.
Name your trigger something like “Click – Generic” and then choose “Click – All Elements” in the trigger type window
Leave the radio button so that “All Clicks” is selected (as opposed to “Some Clicks”) and then click save.
Next go to Variables (below Triggers) in the left hand, side bar menu and then click “configure” and then tick all of the “Clicks” options
One this has been done – click “Refresh” back on the homepage of the Workspace and then click “Preview”.
Open your blog in a new tab in Google Chrome.
You should now be able to see that Tag Manager is tracking each time that you click something on your website.
You should also be able to see all of the “Click Variables” – such as click class, click ID and Click text in the Tag Manager preview window at the bottom of your webpage.
These variables will be important for tracking clicks, so it’s important that you know where to find them.
You will need to use a unique click variable, or combination of variables to track specific clicks on your blog.
Tracking a Click on Your Navigation
As an example of tracking something specific, lets track every time someone clicks on the “About” text on your blog’s navigation bar at the top.
The easiest way to do this is to use the “Click Text” to configure your Tag Manager tracking.
Go to the Tag Manager Workspace and click “Triggers” on the left-hand side menu.
Name your trigger something like “Navigation – About – Click” and then under Trigger Configuration choose “All Elements” – there should be an icon of a mouse next to this option.
Now, this time, choose “Some Clicks” and then from the drop-down menu choose “Click Text – Contains – About”.
Now click “Save”.
Next, you need to align your new trigger with a tag.
In the Workspace again, go to “Tags” in the side menu, then Name your tag.
Under “Tag Configuration” click “Universal Analytics”
Choose “Event” as Track Type and then give the event a Category, Action, Label, and Value.
These 4 parameters will pull through to your Google Analytics report. The most important one is the value. For example, if you were tracking a purchase of a product, the value parameter should be aligned to the cost or profit related to the specific product.
It’s important to fill in at least some of the parameters – so you can identify from Google Analytics, when your About text has been clicked in the navigation. If none of your tags had names, you would see that things are getting clicked, but you would have no idea what exactly, people are clicking!
Leave the “Value” parameter blank in this instance however, as the “About” click has no immediate value.
Under “Category” enter “Click” and then under “Action” type “About – Nav”. For now leave “Label” and “Value” blank. Add your Google Analytics UA Tracking ID from earlier, in the “Tracking ID” box.
Now you need to connect your Tag, to your trigger.
Click the grey circle in the Triggering area near the bottom and then find and select the “Navigation – About – Click” trigger from earlier.
Back on the Workspace homepage, click “Refresh” and then “Preview”. In a new tab enter your blog address and then click on the “About” text in the navigation.
If all goes well, you should see that the event is being tracked when you click the “About” text – hold do CTRL or CMD as you click about to open the page in a new tab:
When you are happy – in the Workspace click “Submit” – and you’re done.
Tracking Form Completions
The process for tracking other events on your website is similar to any element that may be interacted with. You need to uniquely identify the element with something such as an ID, a class or text, then align that with a behavior such as a click.
To use the method outlined here, your form must have an ID associated with it.
In the Workspace, go to “Variables” and then ensure that “Form ID” is ticked under the built-in variables.
Then click “Triggers” in Workspace’s side menu and hit “New”
Name the trigger – e.g. “Form Submission” click the grey circle to configure the tag and click “Form Submission”
Now setup the Tag by clicking on “Tags” in the side menu. Then name the tag, click the grey circle to configure it and select “Google Analytics”
Change “Track Type” to “Event” in the drop-down menu.
For the Tracking Parameters, give the Category a Name – e.g. “Leads”, then an Action e.g. “Form Submitted” and then importantly – give it a label.
To add a variable to the Label parameter, click the icon to the right which looks like a Lego brick and then select “Form ID” from the list of potential labels.
Finally, add a trigger by clicking the grey circle near the bottom and then choose the trigger that you setup earlier – “Form Submitted”.
Submit the changes via the “Submit” button.
To check the forms are working, submit a form, and then go to Google Analytics and in the real-time report, so if an event has fired.
Have any thoughts on this? Let us know down below in the comments or carry the discussion over to our Twitter or Facebook.
- Be the data analytics master your company deserves with this $50 certification bundle
- Q&A with Anyblock Analytics: Making blockchain data more accessible
- Logi Analytics acquires Zoomdata, extending market leadership in embedded analytics
- User behavior analytics is more powerful than ever