Subscribe for notification

How to Track Clicks on Outbound Links Using Google Analytics and Tag Manager

Outbound (external) links constitute a large percentage of your website. Do outbound links matter? In essence, for good SEO and ranking, you should have some outbound links pointing to relevant, high-quality resources. These outbound links tell Google that your content is of value.

But there is a catch. Clicks on outbound links take your visitors away from your website. So, naturally your traffic gets thinner and bounce rate goes higher because of this. So, you want to keep a tab on clicks on outbound links. How can you do that using Google Analytics? We will see.

In order to make it much easier to track outbound link clicks, we are making use of Google Tag Manager.

Prerequisites

  • Make sure you are using Google Tag Manager to implement Google Analytics code. It’s very easy and explained thoroughly here. You should have the GA variable set on your GTM workspace.
  • You should learn how to create variables, triggers, and tags on Google Tag Manager. This is not very essential, but it’s good to know.

Let’s start, shall we?

As the first step, you have to create a normal link click trigger on Tag Manager. Go to your Tag Manager workspace and click on “Triggers” on the left pane.

On the next page, click “New”. Type the name for your trigger and select the trigger type as “Just links” as shown below.

For the time being, leave the click to all the links and don’t select the option for some link clicks. This means the trigger will fire for even internal links.

Step 2. Test the Configuration

Save this configuration. Now, let’s test if the link click trigger is working on your web page. 

Click “Preview” to get into the preview mode of GTM and open your website on another tab within the same browser. You should see the preview pane at the bottom of the page.

Now, we need to ensure that our new link click trigger is working. Just Ctrl+click any of the links on your page to see if the click trigger is activated.

As you can see the trigger is firing for any click on the page.

Now our action is to make the trigger we made fire only for outbound link clicks. For this, we need to make use of a specific variable called “Auto-Event Variable”.

Go to the variables section and click “New” to create a new variable. Here, select the type of the variable as “Auto-Event Variable”. In the variable configuration, select the type as “Element URL” and component type as “Is Outbound”.

Now, the auto-event variable will have a true value if the link click is external.

Step 4. Test the Variable

Let’s test this out again. refresh the preview mode within Google Tag Manager without fail. Now, reload the web page on the next tab.

Click any internal link. Look at the variables tab for the external link click trigger. Look for the variable you just created for outbound link clicks. It should show “False” as this is an internal link click.

For an external link click, the variable will show “True”. Verify this and your variable is working fine. Now we need to go back to the trigger we created earlier and make it fire only in case of when the external link click is true.

Click your trigger and select “Some Link Clicks” for when the trigger fires.

Now, select the variable you created and set its value equal to “true” as shown below.

Now your trigger has been set. This trigger can be used to fire your Google Analytics event tag for sending data to your GA account for any external link click.

Now, in GTM go to the “Tags” section and click to create a new tag. Create a new Google Universal Analytics tag and select the track type as “Event”. This will send event data to your Google Analytics account.

Set the various event properties as shown below.

For the property fields, you can have variables also. GTM has a lot of built-in variables that you can add by clicking the “+” button next to each field. For instance, the {{Click Text}} variable passes the text on the external link clicked. {{Click URL}} is the URL of the external link.

If you select these variables, the data on Google Analytics will be more accurate and understandable. It will tell you exactly which external link was clicked.

Further, select the correct Google Analytics account in the “Google Analytics Settings” dropdown so that your tag is sending data to the correct account.

Now, you need to select the trigger. Simply click the triggering section and select the outbound link click trigger we created earlier.

Conclusion

That’s all. Your external link clicks should start showing up on your Analytics account now without any issues. You can test the trigger by refreshing the GTM preview mode and clicking some external links on your website. You can see that they are sending data by looking at your GA real-time view under the Events section. Data should start showing up on your account within a few hours.

JOIN ZOOMOWL
TAKE THE SMARTEST PATH TO ONLINE BUSINESS SUCCESS
By subscribing, you agree with our Privacy Policy
Lenin VJ Nair: Lenin Nair has years of experience in marketing for software and technology domains. He is a certified specialist in marketing and enjoys exploring new ways to market products and services for small and medium businesses. He enjoys reading, writing, traveling, and ideating. He holds an MBA in marketing and a bachelor's degree in IT.

View Comments (3)

  • Thank you for the information, it worked! Where can I see the external clicks? I can see it in the GA real-time view under the Events section, but I can't find the same info anywhere else. Is it possible to add this to goals/conversions? And if so, how?

By continuing, you accept ZoomOwl's usage of cookies.