Tracking outbound links in Google Tag Manager is not a new topic – we’ve written a guide explaining how to do it before – but there is a more efficient way to do it nowadays. Last year, Google introduced a new component type for the Auto-Event variable in Google Tag Manager.
The old method involved setting up a trigger for clicks which don’t include ‘yourdomain.com’ – the new method is a little smarter. We can create a new Auto-Event variable which will return ‘true’ or ‘false’ as its value if the link clicked is outbound or not.

The ‘Affiliated Domains’ field can be left blank if you only want to check the domain GTM is installed on vs the domain in the link the user has clicked, however, you can insert a comma-separated list here of other domains you consider to be affiliates which will not then be considered outbound. It’s probably reasonable to think about this list as an extension of your cross-domain tracking setup and align them accordingly.
As I said though, if you just have one domain to consider as part of your setup (i.e. the one your GTM container is installed on), you can leave this field blank.
If a user then clicks on a link on your website which takes them to a different domain, this variable will return ‘true’ (see below).

This in turn means that if we want to set up a tag to track Outbound Link clicks, we would simply need to configure our trigger as per below:-

Note: the Auto-Event variable will automatically disregard invalid links (e.g. mailto: links, javascript:void etc) so that is a nice little bit of house-keeping that no longer needs to be considered within your trigger setup.
Why use the Auto-Event variable for Outbound Link tracking?
If you manage a large, interconnected set of websites, you could use a variable that lists all your affiliated domains and insert it in the ‘affiliated domains’ field. You could then use the same variable as part of your cross-domain tracking setup too. Meaning anytime that list of affiliated domains needs updated, you can just update that one variable, rather than having to go through and update references across lots of different tags. Much more efficient.
Another benefit would be if you had a basic setup (with no affiliated domains), you could simply export this tag from one container and import to another and it would work right away with no additional configuration required. Again, more efficient if you manage lots of GTM containers across lots of independent websites.
While this was a relatively small addition to the GTM interface, it allows us to work smarter and we’re big fans of that.
Any questions or if you need help setting this up, just let us know – we’re always happy to help.
Posted by
Michael Wilson
Michael is the Director of Strategy at GlowMetrics, implementing complex tracking for our largest clients via Google Tag Manager while steering our wider work across the Google Marketing Platform.
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
May 21st 2021
Google Analytics
3 min read
Rise in Direct Traffic & New Users in Google Analytics? It Might Be ITP…
Have you noticed a significant increase in Direct traffic in your Google Analytics account recently? Maybe it's coincided with a drop in Organic traffic? This is something we've seen happen...
Posted by
Michael Wilson
Mar 12th 2015
Digital Analytics Insights
2 min read
Calculated Metrics (Beta) – new Google Analytics feature rolling out
Google Analytics have released another great feature, and this is one of my favourite updates so far. You can now work out a key metric based on data that’s already...
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...
Leave a Reply