Tracking External Link Clicks in Google Analytics via GTM Tag & Triggers

Learn about tracking external link clicks on blog or website in Google Analytics configured GTM Tags & Triggers to report data as Event hits.

Recently, I published an article about tracking internal link click using GTM in Google Analytics as an event. This post is pretty much similar, just the trigger configuration is inverse. If you haven’t followed the earlier post, then please continue reading entire guide.

Basically, we will achieve the click data in GA using GTM and report the external link clicks as event hits. For that, we need to first configure the GTM with a Tag and Trigger. Please follow below guide for the same:

Creating GTM tag for external link clicks

  1. Login to GTM Account and access the container.
  2. Select your favorite GTM workspace.
  3. Click on ‘ADD A NEW TAG’ option.
  4. Name the Tag – ‘External Tracking Event’.
  5. Hit ‘Choose a tag type to begin setup…’ and select ‘Universal Analytics’ from the list.Choose Tag Type
  6. Next, select the Track Type as ‘Event’ and enter the Event details to be reported in GA.
    • Category = External Link
    • Action = Click
    • Label = {{Click Text}} (make sure you’ve enabled the built-in ‘Click’ variables)
    • Value = blank or ‘0’
    • Non-Interaction Hit = False (setting this to ‘True’ will affect the Bounce Rate metrics)External Link Click Tracking Event Tag Configuration
  7. Select the Google Analytics tracking variable (if already defined) or select checkbox saying ‘Enable overriding settings in this tag’ and enter your Google Analytics tracking ID i.e. UA-XXXXXX-XXGoogle Analytics Tracking ID Field
  8. Finally hit on SAVE button.

A window will popup saying ‘No Trigger Selected’, click on ADD TRIGGER button and proceed to next section in this guide.

No Trigger Selected Window

Create and configure GTM trigger for external link clicks

Trigger for external link click event is pretty simple. We’ll just create a rule wherein any click URL link that doesn’t match our domain name should fire the event tag that we’ve set up earlier.

After you hit on ADD TRIGGER button, you’ll have a window with an entire list of existing triggers. Considering the trigger is not set up yet, follow the below steps.

  1. Hit on + to add a new trigger (available at right-hand top corner)
  2. Name the new trigger as ‘External Link Click Trigger’ (or anything you can identify)
  3. Hit on ‘Trigger Configuration’ box to choose a trigger type
  4. Select ‘Just Links’ from Trigger Type window'Just Link' Trigger Type
  5. Change the trigger fires on the radio button to ‘Some Link Clicks’ from the default ‘All Link Clicks’
  6. Select firing condition as true from drop-down when Click URL 'does not contain' www.example.com
    External Link Click - Trigger Setup
  7. Finally hit on SAVE button and also save the Event tag again to be double sure

Preview the changes on a live website to validate the event tag is setup and firing are correct and publish the link tracking event.

Reading the collect event data in Google Analytics

The event data will be collected and available in Google Analytics under Events [Behavior > Events] tab. Open ‘Top Events’ tab and click on ‘External Link’ event category and switch to Event Label dimension.

External Link Event Label Data

The event labels displayed are nothing button the {{Click Text}} that we’ve setup while configuring the tag. Add the secondary dimension as Page to display corresponding page URL where external link click has occurred.

External Link Event Label corresponding Pages

How to use this?

Now based on the data you may now answer the question like:

  • How many external clicks happened? – Total Event for External Link category.
  • Which page has maximum external link clicks? – Events sorted in desc. order with secondary dimension as Page in place.
  • Which click has maximum external navigation? – Event Label with Total Events metrics.

And many more business-related questions that you weren't able to answer before this implemention.

If you've any thoughts on Tracking External Link Clicks in Google Analytics via GTM Tag & Triggers, then feel free to drop in below comment box.
Also, please subscribe to our restoreBin YouTube channel for more important updates. Cheers!

Share
Hey there, I hope you doing awesome! I’m Kushal Azza, a certified digital analytics professional, technophile, a blogger & your host at @restoreBin

Leave a Reply

Your email address will not be published. Required fields are marked *