You want to know exactly how many visitors click on external links on your website? This is not only important for evaluating your content but also for analyzing your marketing engagement. This guide shows you how to set up effective tracking of outgoing links with Google Tag Manager. Step by step, you will learn how to create a trigger and variables to better understand user behavior.
Main Takeaways
- External links can be tracked using specific triggers in Google Tag Manager.
- A custom variable is necessary to filter the links.
- In Google Analytics, you can then analyze clicks on external links in detail.
Step-by-Step Guide
Firstly, isolate the concept of outgoing links. When you click on an external link, you leave your website. We set up the tracking accordingly to better understand these clicks.

1. Create Triggers for Link Clicks
In Google Tag Manager, you need to create a new trigger that measures all link clicks. Choose the option "All Link Clicks" and set the filter so that only links are considered.

2. Set Up Custom Variable
To distinguish between internal and external links, you need a custom variable. Go to the "Custom Variables" section and create a new variable, name it e.g. "external links." In the configuration, choose "Element URL" and opt for the "is outbound" option so that only exterior links are captured.

3. Activate Preview Mode
It's time to test the changes before publishing them. You can activate the preview mode in Google Tag Manager. This way, you can see which tags and triggers are active on your website before going live.

4. Test the Trigger
Click on various links on your website and check if the tags trigger correctly. If you have configured everything correctly, you should see the "external links" variable with the value "true" under the variables when you click on an external link.

5. Adjust Triggers for External Links
Now, edit the trigger to ensure that it is only activated for external links. Change the condition from "all clicks" to "some clicks" and use your custom variable "external links." Specify that the trigger will only be activated when "external links" is set to "true."

6. Create Tag for Google Analytics
Now, it's time to create a tag that sends your clicks to Google Analytics. Name it "external links." Choose "Universal Analytics" as the tag configuration and set the tracking type to "Event." For the category, you can select "external links," and for the action, simply choose "click." You can also specify the Page URL as a label to track exactly where the clicks occurred later on.

7. Assign and Save Triggers
In the final step, link the tag you just created with the trigger for external links that you set up earlier. This establishes a connection that ensures the clicks are sent to Google Analytics when the trigger is activated. Save all changes before exiting Google Tag Manager.

8. Testing the Implementation
Switch to preview mode and test the settings by clicking on various external links. Make sure that the clicks are recorded in Google Analytics under "Events".

Summary
With this guide, you have learned how to set up tracking for outgoing links in Google Analytics. You have gone through the steps to create triggers and variables in Google Tag Manager, and were able to live test if the implementation works as well. This not only tracks clicks on external links but also provides valuable insights into user behavior.
Frequently Asked Questions
How do I create a trigger for external links?To create a trigger for external links, go to "Triggers" in Google Tag Manager, choose "New" and set the conditions so that only "outgoing links" are considered.
Can I also use Google Analytics 4?Yes, you can perform similar steps for Google Analytics 4, although the configuration may differ slightly.
Why do I need a custom variable?The custom variable is necessary to distinguish clicks on external links from internal links.