Want to know which links your visitors are clicking on on your website and where they head off to? If you have a link to a third party website, by default in Google Analytics, you’ll have no idea how many of your users are clicking on that link or much traffic you’re sending to that third party – but by setting up Outbound Link Tracking via Google Tag Manager, you can see exactly that!
So, how do we do it? Here’s a quick how-to guide:
Step 1: Create the Tag
Insert your own GA tracking ID when configuring the tag, feel free to use your own naming convention for the Event Category and Event Action but it’s important to use the {{Click URL}} variable for the Label – this will automatically pull in the URL of the link the user clicked on so you can see that information in your Google Analytics event reports.
Step 2: Create the Trigger
We want to track whenever a user clicks on a link, so we’re using a Click Event trigger targeting ‘Just Links’. We’ve selected ‘Wait for Tags’ so the tags have a chance to fire before the user moves away to the new URL and we’re enabling it on every page using the RegEx .* (if you’re not familiar with Regular Expressions, this will match everything).
The important part here is the Fire On rule, which states the Click URL does not contain yourdomainname.com (for us, it’s glowmetrics.com, yours will be whatever your website address is). This tells the tag to only fire whenever a user clicks on a link on your website that goes to a different website. Makes sense, right?
Once you’ve set up the tag and trigger, remember to publish your changes in GTM. Then whenever you’ve done that, you should be able to see Outbound Links being tracked in your Google Analytics account like this:
Easy when you know how! If you’ve got any questions on tracking Outbound Links or you would like more help with your Google Tag Manager set up, leave a comment below or Contact Us – we’d love to hear from you.
One response to “Outbound Link Tracking via Google Tag Manager”
Leave a Reply
Posted by
Michael Wilson
Michael is the Digital Analytics Director at GlowMetrics, implementing complex tracking for our largest clients via Google Tag Manager while leading our wider analytics work across Google Analytics, Data Studio and Optimize
Read more from Michael WilsonBrowse by Category
- Social Media
- SEM
- SEO
- Google Ads
Digital Marketing
- Google Analytics
- Google Tag Manager
- Google Opimize
Digital Analytics
Optimise your website and marketing campaign performance with Ireland’s leading digital analytics agency
Sign up to our newsletterEnjoyed reading this article? Find more like it below…
Posted by
Michael Wilson
Jun 25th 2021
Digital Analytics Insights
3 min read
How To Pull in Header Text as a Variable Using Google Tag Manager
If there's a piece of text loaded on a page that you would like to collect as part of your data analysis, there are several ways to do this using...
Posted by
Michael Wilson
Sep 20th 2022
Digital Analytics Insights
4 min read
Does FBCLID affect GA4? Remove FBCLID + Other Unwanted Query Parameters in GA4
FBCLID is Facebook's Click Identifier - a query parameter appended to all links posted on Facebook since 2018. In response to browsers clamping down on third-party cookies, this FBCLID identifier...
Posted by
Conor Ross
Jun 9th 2019
Digital Analytics Insights
3 min read
Data Dashboard for Paid Social Campaigns
It can be time-consuming to keep track of all your Paid Social Campaigns, with each campaign running on a different channel or platform. Using Google Data Studio, you can collate...
Is there a way of doing this, but not hard coding the domain name? So in pseudo code something more like
Click URL does not contain THIS.domain
where THIS is automatically set to the current domain?
Thanks
Chris