• Skip to main content
  • Skip to primary sidebar

How to Track External Link Clicks Using Google Tag Manager?

Reading Time: 4 mins. Posted on December 19, 2018 .

Google Tag Manager can track the amount of traffic sent to other websites from links placed on the website. Reports include each link clicked for each page.

How to Track External Link Clicks Using Google Tag Manager?

External links are links to a different domain. It takes the user from your website to other websites. In this article, I will help you to configure a Google Tag to track external links click on your website. Then see the reports in Google Analytics. What links are getting the clicks and from which page of the site.

This tag is not only helpful in understanding which links are getting the clicks but one can even measure the amount of traffic being sent out. Moreover, it also shows which links from which pages are getting the clicks.

So let us begin.

Step 0: Pre-requisite

You should be aware of Google Tag Manager Lingo. Moreover understand what is a trigger, tag, and the built-in variables available.

The next is, you should have a Google Tag Manager for tracking site’s traffic in Google Analytics. Though it is not a must, we will still need to have the Google Analytics Property ID to be able to send link clicks data to Google Analytics.

If you aren’t sure, refer to my article – How to Connect Google Analytics With Google Tag Manager first and then continue with this article.

Step 1: Create Trigger

We create a “Click Links” Trigger in Google’s Tag Manager and fire it based on the value of the link clicked.

Google Tag Manager trigger configuration

  • Trigger name: Anything that you think will help you understand as the name of the trigger. I have it as “External Link Clicks“
  • Trigger type: We want to have a trigger for link clicks on our website. So we choose  “Click – Just Links“
  • Trigger fires: “Some Link Clicks” and select “Click URL” > “does not contain” > “yourdomainname.com”

Note: Replace “yourdomainname.com” with your domain name.

Note 2: Click URL may not be available in the drop-down. Add the variables by selecting the “Choose Built-In Variable …” option and select the variable.

This trigger will fire for link clicks on your website when the url is not from your choice of domain. It means your tag will fire and send data to Google Analytics when an external link is clicked on any pages of your site.

Points to consider for tracking clicks:

  1. The above trigger works fine for relative URLs or even # base anchor URLs.
  2. Email links, telephone links or WhatsApp links, may be treated as external links. If you don’t want to see these link clicks being tracked as external links in Google Analytics events report, you may need to add an extra check.
  3. Old style JavaScript-based URLs may be treated as external link. So if you want, it may be needed to be excluded from the trigger.

Step 2: Create a Tag For the Trigger

Google Tag Manager tag configuration

Create the external link click tag with the following metrics.

  • Tag name: Anything that helps you identify the tag in the future. I have it as “External Link Click“
  • Tag type We will be using Google Analytics for our external link click. So we use “Google Analytics – Universal Analytics“
  • Track type: Event (Selected from the drop-down menu list)

Event Tracking Parameters

  • Category: External link
  • Action: {{Page URL}}
  • Label: {{Click URL}}
  • Value: Leave blank
  • Non-Interaction hit: False
  • Google analytics settings: {{Google Analytics ID}}

Click Save. The {{Page URL}} and {{Click URL}} are built-ins variable that will send the needed data to Google Analytics.

You can either type the variable name or can even select from the list by clicking on the lego button beside it. If you don’t see those variable in the list of variables, there is + sign in the upper right corner to add one.

Track Your Tag in Google Analytics

Sign in to your Google Analytics account and click Behavior > Events > Overview.

How to Track External Links Clicks Using Google Tag Manager

Here we will see the data we have added in the tag. We had the category as “External Link” in step 2 when creating the tag.

Under the External Links event category, we will see the event label with all the links that are clicked by users.

If you wish to see for each link which pages on your site have generated the outflow of traffic, just click the links in Event Label and it will show a report of pages from where the links were clicked.

To view the overall pages where the external links are getting clicks, use the event action link as shown in the image below.

Step 4: AMP External Link Tracking

If you wish to track external link clicks for AMP pages on your site as well, you will have to create the same triggers for the AMP container separately in Google Tag Manager.

You are Here: Home / Tools / Google Tag Manager / How to Track External Link Clicks Using Google Tag Manager?

About Shabbir Bhimani

Blogging Since 2009. If I can leave my high paying C# job in an MNC in the midst of global financial crisis of 2008, anybody can do it. @BizTips I guide programmers and developers to Start and Grow an Online Business. Read more about me here.

May I help You With ...

Upwork Proposal
Finding Clients
Start a Store
Start a Blog
 

Or Help Yourself ..

Primary Sidebar

About Shabbir Bhimani

Blogging Since 2009. If I can leave my high paying C# job in an MNC in the midst of global financial crisis of 2008, anybody can do it. @BizTips I guide programmers and developers to Start and Grow an Online Business.

Get in touch with me on LinkedIn or read more about me here.

Let me Guide You to Start and Grow your Online Business

Download my
FREE eBook NOW
to win more clients.
And it is not an annoying pop-up either

Additional menu

  • Twitter
  • Linkedin

BizTips

Shabbir Bhimani: Start and Grow an Online Business

  • Freelancers Start Here
  • Start An eCommerce Store
  • Start A Blog
  • About
  • Archive
  • Disclaimer
  • Contact
  • Glossary

2009 - 2023 All my content & images are licensed as Creative Commons.

WebTurtles LLP. LLPIN: AAL-5288. Hosted with Linode.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, 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 have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT