In this article, I will show you how to track outbound links (also known as outbound clicks or external links) via GA4 and GA3 (Universal Analytics).
What is GA4 outbound links tracking?
Through the GA4 outbound links tracking feature, you can track clicks on external links in your GA4 property without any additional code or tagging.
External links (also known as ‘Outbound links‘) are links to other websites from your website.
An external link is a URL that, when clicked, takes a user from one web page to another web page, and both the source and destination web pages are hosted on different websites/domains.
For example, a link to your Linkedin profile from your ‘about us’ page is an external link.
Note: Outbound links tracking is also known as exit tracking.
If you are an affiliate, you would like to know how much traffic you are sending out to other websites.
You would like to know which external links are clicked by your website users.
If your website links out to your social media profiles, you would like to know which social media profiles are visited by your website users:
Let us suppose you own two websites linking out to each other.
You would like to know how many users navigated between the two websites.
You can get answers to all these questions by implementing outbound links tracking.
What is required in order to set up outbound links tracking?
Your website or landing pages need to have one or more external links for the outbound links tracking to work.
How to set up outbound links tracking in Google Analytics?
GA4 (Google Analytics 4) automatically tracks outbound links once the enhanced measurement tracking is enabled. However, finding the outbound links data is a bit tricky.
GA3 (Universal Analytics) does not automatically track outbound links. You would need to use Google Tag Manager to set up outbound links tracking.
How to find outbound clicks data in GA4 through the ‘Events’ report
Follow the steps below:
Step-1: Once you have enabled the outbound clicks tracking in your GA4 property, wait for at least 24 hrs to gather outbound clicks data in your reports.
Step-2: Navigate to Reports > Engagement > Events
Step-3: Type ‘click‘ in the search box and then press the enter key:
Step-4: Click on the event name ‘click’:
You should now see the detailed report for the event ‘click’:
How to find outbound clicks data in GA4 by creating an exploration report
Follow the steps below:
Step-1: Click on the ‘Explore’ link from the left-hand side navigation bar in your GA4 property:
Step-10: Search for the ‘Event Count’ metric and then click on the checkbox next to it:
Step-11: Click on the ‘Import’ button to import the selected metric to the report:
You should now see the imported metric listed under the METRICS section:
Step-12: Double-click on the dimension ‘Link URL’ so that it is automatically added to the ‘ROWS’ section:
Note: When you double-click the dimensions, you won’t see any change to the canvas on the right. But the dimension has been added to the canvas. When you start adding metrics to the canvas, you will see the dimension(s) added to the canvas.
Step-13: Double-click on the ‘Event Count’ metric so that it is automatically added to the blank canvas on the right:
Step-14: Scroll all the way down under the ‘Tab Settings’ column until you see the section called ‘FILTERS’:
Step-15: Click on ‘Drop or select dimension or metric’:
Step-16: Click on the ‘Event Name’ dimension from the drop-down menu:
Step-17: Click on the ‘Select match type’ drop-down menu:
Step-18: Click on ‘exactly matches’:
Step-19: Click on the ‘enter expression’ text box:
Step-20: Type ‘click’ in the text box and then click on the first search result ‘click‘:
Step-21: Click on the ‘Apply’ button to apply your filter to the canvas on the right:
Step-22: Click on ‘Drop or select dimension or metric’:
Step-23: Click on the ‘Link URL’ dimension from the drop-down menu:
Step-24: Select match type to ‘begins with‘, enter ‘http‘ as the filter expression and then click on the ‘Apply‘ button:
You should now see a screen like the one below:
That’s how you can see the outbound clicks data via the exploration report.
Tracking outbound links in GA3 (Universal Analytics) via Google Tag Manager
If you use Google Tag Manager for your analytics implementation, setting up outbound link tracking is very easy.
This method is the most recommended since you do not need to write any code for every outbound link.
Imagine you have more than ten outbound links on your website.
If you are not using Google Tag Manager, you will need to add code for every link using the ‘onclick’ function and additional analytics script.
To track outbound links using Google Tag Manager, you must carry out the activities below.
Create an auto event variable
Create a trigger
Create a tag
Debugging and validation
Creating an auto event variable
The first thing to do is to create an auto event variable which is nothing but a variable that captures information about the link click and returns true if it is an external link (outbound), else it returns false if it is an internal link.
Follow the below steps to create an auto event variable.
Step-1: Navigate to your GTM container and click on ‘Variables’.
Step-2: Now scroll down and click on ‘New’ under ‘Use-Defined Variables’.
Step-3: A new window will pop up like below. Give it a proper name and click on ‘Variable Configuration’.
Step-4: Click on ‘Auto-Event Variable’ from the variable configuration list.
Step-5: Now click on the drop-down under ‘Variable type’ and select ‘Element URL’
Step-6: Now click on the drop-down under ‘Component type’ and select ‘Is Outbound’.
Step-7: You need to provide the list of ‘Affiliated Domains’.
Affiliated domains here refer to the list of your internal domains.
If you want to add other domains as internal, you can add them here as a comma-separated list.
The variable will return true if the URL does not match the current page’s domain or the list provided in affiliated domains.
Note: The auto event variable by default considers subdomains as external, so if you want to add your subdomains as internal, you need to specify it in the ‘Affiliated domains’ list (for example, blog.example.com).
Follow the below steps to create a trigger for tracking outbound links
Step-1: Click on the ‘Triggers’ menu.
Step-2: Click on the ‘New’ button.
Step-3: Give your trigger a valid name and click on ‘Trigger Configuration’.
Step-4: Select the ‘Just Links’ trigger type.
Step-5: A new configuration window will appear like below. Select the radio button ‘Some Link Clicks’
Step-6: Now select the auto event variable we created earlier from the first drop-down under the condition.
Step-7: Select the ‘equals’ operator in the second drop-down and type ‘true’ in the input box provided.
Step-8: Your final trigger will look like the below. Click on ‘Save’
Now, let’s move to creating a tag for tracking outbound links.
Creating a tag
Follow the below steps to create a tag for tracking outbound links.
Step-1: Click on ‘Tags’ in the left-hand side menu.
Step-2: Click on ‘New’.
Step-3: Give a proper name to your tag and click on ‘Tag Configuration’.
Step-4: An overlay will appear on the right-hand side with a list of tag templates. Select ‘Google Analytics: Universal Analytics’.
Step-5: Click on the ‘Track Type’ drop-down and select ‘Event’.
Step-6: Now under ‘Event Category’ type ‘Outbound Link Click’.
Step-7: Now click on the plus (+) button next to ‘Action’.
Step-8: Select the ‘Click Text’ variable as an event action. This will provide us with details about what text was clicked when the user was leaving the website.
Step-9: Now click the plus (+) button next to ‘Label’ and select the ‘Click URL’ variable.
Step-10: Now select the Google Analytics settings variable.
Step-11: Click on the ‘Triggering’ option below the tag configuration.
Step-12: Now select the trigger that we created earlier.
Step-13: Click on ‘Save’.
Congratulations!
You have successfully set up outbound link tracking. Now it’s time to check the implementation.
Follow the below steps to debug and validate the implementation.
Step-1: Click on the ‘Preview’ button (on the top right-hand side) in Google Tag Manager.
Step-2: A new window will open with Google preview mode. Add the URL of your website where external links are present and click on ‘Start’.
Step-3: Another new window will open with the specified URL.
Now click on any of the external links and navigate back to the preview window of Google Tag Manager. You should see the outbound link click tag has fired.
As an example, I have created an external link to Facebook, and we will test that here.
You can click on the tag to see more details.
Tag Details
Firing Triggers
Step-4: Now click on any of the internal links and validate if the outbound link tag fires.
While creating the auto event variable, it should not fire on any of the internal links or the list of domains that we provided in the ‘Affiliated domains’.
You can further check the firing trigger to validate.
As you can see in the below image, the auto event variable is not true (since it’s the internal link click); hence, the tag did not fire.
So this is how you can debug and validate the outbound link tracking events.
You can further log in to Google Analytics and check it in ‘Real-time’ reports as well.
Once you have published your container, you will start recording the outbound link click events.
You can check it under Behavior > Events > Top Events.
Other articles related to GA4 (Google Analytics 4)
Frequently asked questions about how to track outbound links in Google Analytics
What is an outbound link?
An outbound link is also called an external link. It is a link from your website domain to a different website domain. For example, if your website domain is ‘abc.com’, then all the links that do not contain the ‘abc’ domain will be considered outbound links.
Why is tracking outbound links in Google Analytics important?
While browsing the website, a user may come across multiple outbound links, and he might click on them and leave the website. Tracking the outbound link clicks is very important to know the user behaviour and how they leave the website.
Perhaps they might be clicking on external links like your own social media pages or other domains that you own.
How to track outbound links using Google Tag Manager?
To track outbound links using Google Tag Manager, you need to follow the below steps:
1. Create an auto-event variable in Google Tag Manager with ‘Variable type’ as ‘Element URL’, ‘Component type’ as ‘Is Outbound’ and a list of ‘Affiliated domains (domains you own)’.
2. Create a trigger with ‘trigger type’ as ‘Clicks-Just Links’, and in condition, add the ‘Auto-Event Variable’ equals to ‘true’.
3. Create a tag with ‘tag type’ as ‘Google Analytics: Universal Analytics’, ‘track type’ as ‘Event’, then add ‘Event Category’ as ‘Outbound Link Click’, ‘Event Action’ as ‘Click Text’ variable, and finally ‘Event label’ as ‘Click URL’ variable.
4. Save the tag and click on the preview to debug and validate,
5. Once verified, you can publish the container.
Register for the FREE TRAINING...
"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."
Here’s what we’re going to cover in this training…
#1 Why digital analytics is the key to online business success.
#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.
#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.
#4 Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.
#5 The number 1 reason why conversion optimization is not working for your business.
#6 How to advertise on any marketing platform for FREE with an unlimited budget.
#7 How to learn and master digital analytics and conversion optimization in record time.
My best selling books on Digital Analytics and Conversion Optimization
Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.
Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.
Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.
Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.
About the Author
Himanshu Sharma
Founder, OptimizeSmart.com
Over 15 years of experience in digital analytics and marketing
Author of four best-selling books on digital analytics and conversion optimization
Nominated for Digital Analytics Association Awards for Excellence
Runs one of the most popular blogs in the world on digital analytics
Consultant to countless small and big businesses over the decade
Learn and Master Google Analytics 4 (GA4) - 126 pages ebook
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.