I don’t know about you, but when I was starting my first internet business in 2015, I remember trying to find out how to track a link on my website so many times. Each time, I remember trying to figure out Google Tag Manager and then the integration of Google Analytics with that and then coding some html stuff to try and get Google to recognize which link I wanted to track…
Wow was it ever a nightmare. I always would end up telling myself that I did not need to track my links and that restricted me in so many ways when running PPC campaigns and seeing which call to actions were actually working on my website.
It took me 3 years to finally put my foot down, grit my teeth and finally keep pushing through articles, youtube videos and Google’s own guides to figure it out. I honestly don’t know why everyone makes it so confusing – it really doesn’t have to be!!!
And honestly it shouldn’t be!
Today, I’m going to try my best to walk you through the process of tracking link clicks on your website using google tag manager and google analytics literally from A-Z. If I skip over anything or assume anything, please please let me know in the comments below. I absolutely do not want you to struggle with this task anymore and I’m here to make sure it’s not the reason your online business doesn’t flourish.
These are the steps I’m going to cover so feel free to skip over to the part that you’re stuck at if you feel like you’ve already got the basics down:
***IMPORTANT! STOP HERE***
Before you get started with the process, I just want to make sure that you know you need a blog/website that is “monetized” a.k.a is set up so people can purchase things on it from you or from your affilaite products so you can make money.
You need something to track and links to click that are “valuable” to you before you should be setting up link tracking!
This is my #1 recommended course to help you set up a website in any niche that makes money in 50 video step-by-step lessons organized into 5 levels (the 1st level with 10 lessons is totally free). It is designed to be completely A-Z much like this post. Even if you don’t have hosting (or if you don’t know what hosting is!), the lessons will guide you through the process.
Continue once you have a website and you have links on that website that will make you money!
Setting Up Google Analytics
Type in “Google Analytics” into Google and create an account with your chosen google account. You want to put in your business name and website URL.
After that’s done, you’ll need to access your tracking ID by going to “Admin” (the gear icon) –> “Tracking Info” –> “Tracking Code”:
Copy your Tracking ID because you’ll need it for the next step…
***IMPORTANT! STOP HERE***
If you already have Google Analytics set up on your website, remove it! Because if you also install it with Google Tag Manager (which you have to in order to track links the way I’m going to show you) all of your data will be recorded twice.
Setting Up Google Tag Manager
First you want to type in “Google Tag Manager” into google and with your chosen google account, you want to sign up for tag manager. Simply put in your business name and your website URL.
After that’s done, you’ll need to add the code Google Tag Manager gives you to your website in the Header and Body section of all your pages (if you’re confused by this, you can add a plugin to WordPress to Insert Headers and Footers just like I have):
Then you want to click on New Tag:
Next, you want to set up your new tag to track all pageviews for Google Analytics. There are already pre-sets for “Google Analytics: Universal Analytics” for the Tag Type and “All Pages” for the Triggering Event. Just make sure that you type in your Google Analytics ID (the one we mentioned above) into the “Google Analytics Settings” box :
Now you are ready to do some testing to make sure what we’ve done so far is correct. To do that click on “Preview” in the top right corner and then go to your website and refresh the page:
You should see something on the bottom of your website that looks like this:
Ignore the “PIN – Base Code” – that’s what I use for Pinterest. What you should see is that your All Pages Tag was triggered 1 time.
If you see this, it means your tag is working correctly. If you don’t see this, make sure you’ve done all the steps to this point correctly and if that doesn’t work, please comment below and I’ll help you out within 24 hours!
A t this point, let’s save our changes by clicking “Submit” in Google Tag Manager. You just need to create a name for the changes you’ve done. I usually just describe what my changes were that day. You can put something like “Installed All Pageviews Google Analytics”.
Testing Pageviews with Google Tag Assistant
Go to the Chome Extension Store and install Google Tag Assistant. This will help you make sure that your tags are working.
Once it’s installed, it will let you know when events are triggered on the page without having to use the preview function in Google Tag Manager.
This is what it should look like when you’re on a page:
If you see this, you’ve done everything up until now correctly.
How to Track A Link Click Event
Okay ladies and gentlemen! We’re really getting there now. Just bear with me a little bit longer and I promise it will be worth it.
Pick a page on your blog with a link that you want to be clicked. I’m going to go to one of my landing pages (dontwantaboss.com/how-to-beat-the-market) as my demonstration.
I have 2 places on the bottom of this page that are links visitors can click in order to go to one of the affiliate products that I promote through Clickbank:
Both of these are clickable images (TEXT LINKS WORK THE SAME WAY, TRUST ME) so we’re going to go through the process of tracking any clicks that I get using Google Tag Manager. This way, I can track exactly how many people are clicking through to the sales page.
Obviously not everyone who comes to this landing page is going to click but this is really useful information because maybe if I put the button at the top of the page more people would click it and this allows me to test how well my landing pages are converting.
Once you have your landing page or blog post or product with your call to action link, you’re going to go back to Google Tag Manager and create a new tag.
This time this is what the parameters are going to look like:
This time we’re choosing “Event” as our Track Type.
For Event Tracking Parameters, this is going to be your naming scheme in Google Analytics when you get your reports so choose something and stay consistent.
My naming is as follows so feel free to use the same template if that makes things easier:
Category: BTMA Sales Page (that’s the desitination of my clicks)
Action: Click URL (pre-definted variable)
Label: Page URL (so I know which page the link clicks came from)
I’ve found that this naming system works really well for me.
Last step!!!! WOOO!!!
Now, you have to set the trigger. You can get really fancy here but I don’t like doing that. I like to keep things super simple:
If you just set 2 paramaters for this trigger you are set. Basically if someone is 1) on the page URL specified and 2) clicks the URL specified, then the trigger will fire.
Now, let’s make 100% sure it works by testing it out in 3 different ways.
Testing Link Clicks x3 Ways
#1: Preview Mode
The easiest way to test this is to make sure your links always open in a new tab. This is good for your website views and as a general practice but also makes it easier to test in Preview mode because you’ll be able to see the event trigger while your link destination opens in a new tab.
Go to preview mode in Google Tag Manager and then go to your landing page.
Now click on the link as many times as you like!
This is what it should look like when you click once:
And now twice:
#2: Google Tag Assistant
If you haven’t already, submit your new changes in Google Tag Manager and exit Preview mode.
Now go back to your landing page and open your Google Tag Assistant. You should see this:
After you click on Google Anlytics, you should see this:
Now, click on the link and notice how the following appears:
If you click on the event, you’ll see all the details that we inserted earlier:
#3: Google Analytics
Now is the moment of truth. You want to make sure you can actually see your changes in Google Analytics (obviously).
Go to Behavior –> Events and you should see your events there if you choose “today” from the calendar (Google Analytics doesn’t automatically show the current day).
Here’s what it should look like:
If you click on the event, you’ll see more details:
You can see here that there are 10 total events but only 1 unique event. This is because it was only me clicking it 10 times so only 1 person but 10 clicks. You can also click on “Event Label” or “Event Action” to sort events by our different naming conventions.
Using Link Tracking to your Advantage
Now that you know how to track link clicks, you can use this to your advantage in a few ways:
#1: PPC Campaigns
#2: Setting an avg. value for each click (how many clicks does it take to your landing page to make a sale? then divide earnings by #clicks and you get your avg. value) so you can track your earnings from Google Analytics and create Goals for yourself
#3: What types of CTAs are people clicking on the most? Use these more often to boost your sales!
I really really hope this was easy to understand. If you have any questions at all let me know in the comments!
P.S. Pin this for later: