How to Track Your Website’s Outbound Links

Last Updated on September 20, 2022 by 8 Comments

How to Track Your Website’s Outbound Links
Blog / Tips & Tricks / How to Track Your Website’s Outbound Links

Regardless of what type of website you run, itโ€™s bound to have dozens (if not hundreds) of outbound links. As time passes, some of those links might stop being relevant or become broken, so itโ€™s crucial that you keep track of them.

You can always create a list of all the links youโ€™ve added to your website, but thatโ€™s not practical. A better approach is to use a tool that helps you track outbound links, such as Google Analytics. In this article, weโ€™ll talk about why itโ€™s important to keep tabs on these links, and teach you how to do it with the aforementioned tool. Letโ€™s get to work!

Why Itโ€™s Important to Track Your Outbound Links

If youโ€™re a regular Elegant Themes reader, youโ€™ve probably noticed we include a lot of outbound links in most of our pieces. This is to help you find related content that you might find interesting, and to support the information we present. In fact, most websites will link to external content at least to some degree.

The problem is, itโ€™s often hard to keep track of all the links you add to your websites. This can cause you a few problems down the line:

  • Websites might go offline. Not all websites stick around forever. This may lead you to to unwittingly linking users to sites that no longer exist, which can hurt your SEO.
  • Content could become outdated. Some content might stop being relevant or useful as time passes. When that happens, youโ€™ll want to replace those outbound links with newer ones.

Additionally, by tracking your outbound links, youโ€™re also not able to monitor their Click-Through Rates (CTR). This can help you determine where best to place links, and optimize their anchor text.

In any case, the best approach to tackling this is to find a tool that can help you compile all your outbound links. There are plenty of services you can use to monitor those links and see how theyโ€™re performing. Letโ€™s talk about how to use one of them.

How to Track Your Websiteโ€™s Outbound Links (In 3 Steps)

For this section, weโ€™re going to focus on how to track outbound links using Google Analytics. We chose this approach for a few reasons. First off, itโ€™s always a good idea to use an analytics tool for your website and Google Analytics is one of the best options on offer. Secondly, using Google Analytics provides you with a lot more benefits than merely being able to track outbound links. For example, it enables you to monitor the performance of your links, which is one of the benefits we mentioned earlier.

One way you can do this is byย manually adding JavaScript to your Google Analytics tracking code. However, weโ€™re going to show you an approach that is cleaner, and has the added benefit of helping youย learn how to use the Google Tag Manager, which is another handy tool.

In order to follow this process, you will need to have a Google Analytics account set up to work with WordPress. If you havenโ€™t set one up already, do this now.

Step #1: Configure Googleโ€™s Tag Manager to Monitor Outbound Link Clicks

Even if youโ€™re familiar with Google Analytics, you may not know how to useย Google Tag Manager or what it does. In short, Google Tag Manager is a tool that can help you customize the Google Analytics JavaScript code on your website. With it, you can track complex events through a simple tags system. In this section, weโ€™re going to teach you how to use Tag Manager to set up outbound link tracking with Google Analytics.

To get started, create a Google Tag Manager account and link it to your website. Once youโ€™ve done that, open Google Tag Manager dashboard and look for the tab readingย Triggers. Click on it and hit theย Newย button at the top of the screen:

Adding a new trigger.

Triggers are conditions that determine whether or not a tag is activated. In this case, the trigger will be used to track when an outbound link is clicked. Start by setting a name for your new trigger, for exampleย Outbound Link Clicksย to make the purpose clear. While youโ€™re at it, you should also set theย Clickย option toย Choose Event, then move on the Configure Triggerย section and choose the option that readsย Link Click:

Choosing a type of event for your trigger.

So far, weโ€™ve set up a trigger that activates when someone clicks on a link within your website. Now weโ€™re going to get a bit more specific. Look for theย Enable Whenย section and input the following settings in order,ย Page URL > matches RegEx > .*:

Configuring when to enable your trigger.

This tells Google Analytics to track this type of event on allย pages on your site. All thatโ€™s left now is indicate what type of links it should track. To do that, go to theย Fire Onย section and choose theย Some Clicksย option. Configure it to fire using the criteriaย Click URL > does not contain > yourdomain.com:

Configuring your event's trigger.

This configures the trigger so that it only track when someone clicks a link that doesnโ€™t include your domain. You should, of course, replace theย yourdomain.comย placeholder with your own siteโ€™s URL. When youโ€™re done, click onย Save Trigger.

We just set up our eventโ€™s trigger! All you have to do now to start tracking is link it to Google Analytics.

Step #2: Link Your New Trigger to Google Analytics

Google Tag Manager works with several tools, not just Google Analytics, so you need to manually link your new trigger to your Google Analytics account before it starts to work. To do that, return to your Google Tag Manager dashboard and go to theย Tagsย tab. On the next screen, name your tag and choose Google Analytics as the product:

Set a name for your tag.

Now, setย Universal Analyticsย under theย Tag Typeย heading, assuming youโ€™re using that implementation on your website (which you should be). Further on, type {{AnalyticsID}} underย Tracking ID.

This is where things get a bit tricky. Here youโ€™ll see a section calledย Event Tracking Parameters. Inside, you need to add a number of settings exactly as we describe them. Chooseย Outbound Linksย underย Category, then typeย {{Click URL}}ย underย Action, andย {{Page Path}}ย right beneathย Label:

Configuring your new tag.

Finally, scroll down to theย Fire Onย section and click on theย Moreย option:

Configuring when your trigger should fire.

On the next screen, youโ€™ll see a list of all your custom triggers. You should see the trigger you set up during step number one here:

Choosing your custom trigger.

Choose that trigger and click on theย Create Tagย button. Your new tag is now ready to be published, which you can do by clicking the redย Publishย button at the top of your Google Tag Manager dashboard:

Publishing your new tag.

With that, youโ€™ve completed the setup portion of this tutorial!

Step #3: Monitor Your Siteโ€™s Outbound Links From Your Google Analytics Console

During the first two steps, you created a custom Google Analytics event you can monitor from your dashboard. If you want to see it in action, youโ€™ll need to let your website accrue some data beforehand. After waiting a while, go to your Google Analytics dashboard and navigate to yourย Behavior > Events > Overviewย tab. Here youโ€™ll be able to monitor your outbound linksโ€™ performance by looking at theย Top Eventsย section at the bottom of the page:

Tracking outbound links from Google Analytics.

Likewise, you can also monitor real-time data concerning outbound clicks by going to theย Real-Time > Eventsย tab on your dashboard:

Tracking real-time events.

You can now use thisย tab to monitor the performance of your outbound links. You should take some time to check your top performers to see if the links are broken and evaluate whether you need to replace them.

Conclusion

Outbound links are of the most powerful resources at your disposal to help your visitors find other content that might help them. However, sometimes websites will drop off the map or content will become outdated. Without a tracking tool, itโ€™s hard to stay on top of these issues.

As far as tracking tools go, weโ€™re big fans of Google Analytics. Once you integrate it with WordPress, hereโ€™s how to use it to track outbound links from your website:

  1. Configure Googleโ€™s Tag Manager to monitor outbound link clicks.
  2. Monitor your siteโ€™s outbound links from your Google Analytics console.

Do you have any questions about how to track outbound links with Google Analytics? Ask away in the comments section below!

Article image thumbnail by Sammby / shutterstock.com.

Divi

Want To Build Better WordPress Websites? Start Here! ๐Ÿ‘‡

Take the first step towards a better website.

Get Started
Divi
Premade Layouts

Check Out These Related Posts

Splice Video Editor: An Overview and Review

Splice Video Editor: An Overview and Review

Updated on March 10, 2023 in Tips & Tricks

Video is a valuable form of content for social media. Unfortunately, creating quality videos is usually a long process that involves moving mobile footage to a desktop app for editing. However, mobile editing is on the rise. Apps such as Splice Video Editor make it possible to efficiently create...

View Full Post
How to Use Font Awesome On Your WordPress Website

How to Use Font Awesome On Your WordPress Website

Updated on September 16, 2022 in Tips & Tricks

When given the choice between using a vector icon or a static image, it’s a good idea to go with the vector. They’re small and fast to load, and they can scale to any size without a loss of resolution. Font Awesome is a superb library of vector icons that you can use on your websites,...

View Full Post

8 Comments

  1. interesting post ๐Ÿ™‚ if you click on the event action in analytics (the outbound link url) does it show more details, like which page on your site the link was clicked from?

  2. Hi John Hughes,
    Nice post, most of the outbound links point to google analytics :)))
    This is a very detailed tutorial on how to use the google webmaster tool.

  3. Thank you for the info I typically use Google webmasters tool to track backlink but this is great way within dashboard. Keep up improving divi

    • Hi Yasmin. You’re welcome. Thanks for your comment. ๐Ÿ™‚

  4. thank you. Monitor Your Siteโ€™s Outbound Links From Your Google Analytics Console

  5. Hi and thanks for this explanation. Like all things Google, Tag Manager has changed quite a bit since this post. Sadly, I am unable to implement this great functionality because the changes require choosing from displayed choices for such things as triggers and variables. I was unable to fill in the blanks as described above.

    • Hello Neil. Thanks for your comment.

      There does appear to have been some changes made to the interface so the process is a bit more streamlined now. For example, when you go to add a new tag, you can link it to Google Analytics using the Tag Configuration tab, then set a trigger separately through the Triggering section.

      To configure the tag to track outbound links, choose ‘Clicks’ and then ‘Just Links’ from the list of events Google Tag Manager enables you to choose from. After this, enable the ‘Check Validation’ setting and set the event to trigger for URLs that don’t contain your site’s domain.

      Hope this helps.

  6. I recommend adding Click URL does not begin with:
    javascript:
    mailto:
    tel:

    …to exclude these links from your tracking of outbound links!

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Get Started With Divi