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
Conor Ross
Oct 13th 2022
Digital Analytics Insights
3 min read
Introducing Looker Studio
The Artist formerly known as Google Data Studio On October 11th 2022, as part of the Google Cloud Next event, it was announced that reporting and data visualisation tool Google...
Posted by
Michael Wilson
Dec 2nd 2021
Digital Analytics Insights
2 min read
What is /trafficbot.life and why is it appearing in Google Analytics?
There was a significant surge in bot traffic in Google Analytics from 31st January to 2nd February 2021. One of the most common issues we saw came from /trafficbot.life and...
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...
Leave a Reply