Tracking external link clicks is crucial for understanding how visitors interact with your website. Whether users are clicking on outbound links to partner sites, affiliate links, or social media profiles, having this data in Google Analytics (GA4) can provide valuable insights into user behaviour and engagement.
At Creative Digital, we specialise in setting up advanced Google Analytics tracking using Google Tag Manager (GTM). From tracking external clicks and file downloads to button interactions and scroll depth, we ensure you capture the data that matters. If you need help setting up GTM and optimising your analytics, get in touch!
In this guide, we’ll walk you through how to track all external link clicks using Google Tag Manager, so you can make more data-driven decisions for your website.
Step 1: Create a Click Trigger for External Links
- Open GTM and go to the Triggers section.
- Click New and select Trigger Type: Just Links.
- Check “Wait for Tags” and “Check Validation” (optional, but recommended for accuracy).
- Under Trigger Configuration, select Some Link Clicks and add the following conditions:
- Click URL does not contain
"yourdomain.com"
(replace with your actual domain).
- Click URL does not contain

Step 2: Create a Tag to Send Data to Google Analytics (GA4)
- Go to Tags in GTM.
- Click New and select GA4 Event as the tag type.
- Configure the tag:
- Configuration Tag: Choose your GA4 configuration.
- Event Name:
"external_link_click"
(or any preferred name). - Event Parameters:
link_url
→{{Click URL}}
link_text
→{{Click Text}}
link_classes
→{{Click Classes}}
- Attach the Click Trigger created in Step 1.

Step 3: Test in Preview Mode
- Click Preview in GTM.
- Navigate to your website and click on an external link.
- Check if the event fires correctly in GTM’s preview mode.
Step 4: Publish the Changes
Once verified, publish the GTM container, and all external link clicks will be tracked in Google Analytics.
Do you need help setting up advanced tracking, such as differentiating affiliate links, PDFs, or outbound social media links?