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.
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.
We create a “Click Links” Trigger in Google’s Tag Manager and fire it based on the value of the link clicked.
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:
Create the external link click tag with the following metrics.
Event Tracking Parameters
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.
Sign in to your Google Analytics account and click Behavior > Events > Overview.
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.
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.
Free Google Ads Tutorial for an absolute beginner covering campaigns and their types, networks, keywords,…
Do you want to make money programming in Java? Here are 6 creative ways for…
9 smart ways for freelancers to achieve financial freedom. First, you have to believe it…
With so many programming languages and resources available, it can be information overall to learn…
Wise review from an Indian freelancers point of view to receive payments in India. How…
There are 3 types of clients who want you to lower the price. How to…