Featured image of post Monitor Outbound Links on Your Website

Monitor Outbound Links on Your Website

Want to keep an eye on outbound links on your WordPress site? These links, which direct users away from your site to destinations like affiliate products, social media, or other websites you’ve linked to, can be important to monitor. This article will show you how to track these outbound links and determine which external sites get the most clicks.

While creating a manual list of links is possible, it’s not very efficient. A smarter approach is using a tool like Google Analytics for tracking outbound links. This article explains the importance of monitoring these links and teaches you how to do it with Google Analytics. Let’s dive in!

If you frequent Elegant Themes, you’ll notice we use many outbound links in our articles. This is to provide you with related content you might find valuable and to back up the information we present. Most websites, to some extent, link to external content.

The challenge lies in tracking all the links on your site. This can lead to a few issues:

  • Website Disappearances: Websites can go offline, resulting in broken links on your site, potentially harming your SEO.
  • Content could become outdated. Content can become outdated, requiring you to replace outbound links with more current ones.

Furthermore, without tracking, you can’t monitor their Click-Through Rates (CTR), which helps determine link placement and optimize anchor text.

The best solution is utilizing a tool to gather all your outbound links. Numerous services can help you monitor these links and analyze their performance. Let’s explore one such tool.

This section focuses on tracking outbound link clicks on WordPress using Google Analytics. We chose this method for several reasons: leveraging an analytics tool for your site is beneficial, and Google Analytics is a top contender. Additionally, it offers more than just outbound link tracking. You can monitor link performance, one of the advantages mentioned earlier.

While manually adding JavaScript to your Google Analytics tracking code is an option, we’ll demonstrate a cleaner method that also introduces you to Google Tag Manager, another helpful tool.

To proceed, you need a Google Analytics account linked to your WordPress site. If you haven’t set one up, do so now.

Even if you’re familiar with Google Analytics, you might not know Google Tag Manager. In essence, it customizes the Google Analytics JavaScript code on your website, allowing you to track complex events through a simple tags system. This section explains how to use Tag Manager to set up outbound link tracking with Google Analytics.

Start by creating a Google Tag Manager account and connecting it to your website. Then, in your Google Tag Manager dashboard, locate the Triggers tab. Click on it and select the New button at the top:

Triggers determine when a tag is activated. In our case, the trigger will track outbound link clicks. Give your trigger a clear name, like “Outbound Link Clicks.” Set the Click option to Choose Event, proceed to the Configure Trigger section, and select the option that reads Link Click:

Now, we have a trigger that activates upon clicking an external link on your site. Next, we’ll going to get a bit more specific. Find the Enable When section and input the following settings in order: Page URL > matches RegEx > .*:

Event Tracking Configuration

This instructs Google Analytics to track this event type on every page of your website. Finally, we need to specify the link types to track. Go to the Fire On section and choose Some Clicks. Configure it to fire using these criteria: Click URL > does not contain > yourdomain.com:

This ensures the trigger only activates when clicking a link outside your domain. Remember to replace “yourdomain.com” with your actual site URL. Once done, click Save Trigger.

Our event trigger is set up! Now, we just need to connect it to Google Analytics to start tracking.

Linking the New Trigger

Google Tag Manager works with various tools, not just Google Analytics. To begin tracking, link your trigger to your Google Analytics account. Go back to your Google Tag Manager dashboard and navigate to the Tags tab. On the next screen, name your tag and choose Google Analytics as the product:

Assuming you’re using Universal Analytics on your website (which is recommended), select it under Tag Type. Next, under Tracking ID, enter {{AnalyticsID}}.

This is where it gets slightly more complex. Under Event Tracking Parameters, add these settings precisely as described. Choose “Outbound Links” for Category, enter {{Click URL}} for Action, and input {{Page Path}} below Label:

Scroll down to the Fire On section and click the More option:

You’ll see all your custom triggers listed, including the one created in step one:

Select that trigger and click the Create Tag button. Your new tag is now ready to publish. Click the red Publish button at the top of your Google Tag Manager dashboard:

Congratulations! You’ve successfully set up outbound link tracking.

In the previous steps, we created a custom Google Analytics event you can monitor from your dashboard. Allow your website some time to gather data. Then, go to your Google Analytics dashboard and navigate to Behavior > Events > Overview. You can track outbound link performance in the Top Events section at the bottom:

You can also monitor real-time outbound click data by visiting the Real-Time > Events tab on your dashboard:

Use this tab to track link performance and monitor clicks on outbound links on your WordPress site. Regularly check your top-performing links for broken links and evaluate if any need replacing.

Conclusion

Outbound links are valuable for guiding visitors to helpful content. However, websites can disappear, or content can become outdated. Tracking these links manually is challenging. We hope this guide on tracking outbound link clicks on your WordPress website has been useful. If you have any questions or would like to add something, leave a comment below.

Licensed under CC BY-NC-SA 4.0