Do you want to track outbound links in WordPress?
Outbound links are the links that take users away from your website. These could be links to affiliate products, social networks, or simply other websites that you have linked to from your website.
In this article, we will show you how to easily track outbound links in WordPress to see which outbound links get the most clicks.
Why Track Outbound Links in WordPress?
After you build your website, you need to learn how users interact with your website, so you can grow it. The best way to do this is by using Google Analytics.
It allows you to see where your users are coming from, what pages they are viewing, and how much time they are spending on your website. This information helps you adjust your strategy and improve your website accordingly.
Similarly, learning about outbound or external links can help you understand which outgoing links are clicked more often. If you recommend affiliate products, then tracking outgoing links helps you learn which products perform better with your audience.
You can also find new content ideas by tracking outbound links. If people are clicking to view content on another site, then you cover the same topic on your website.
Plus, it helps create new partnerships. You can sign up for affiliate programs, get backlinks, or exchange guest posts with sites to which you send a lot of traffic.
Having said that, let’s take a look at how to easily track outbound links in WordPress.
Tracking All Outbound Links in Google Analytics
The easiest way to track outbound links on your website is by using the MonsterInsights plugin.
MonsterInsights is the most popular Google Analytics plugin for WordPress. It allows you to properly connect your website with Google Analytics and set up advanced tracking without touching a single line of code.
With MonsterInsights, all you need to do is install the plugin, and it will automatically set up outbound link tracking in Google Analytics. It works out of the box, and there’s no need to perform additional steps to track external link clicks.
MonsterInsights also helps set up dual tracking, so you can use Universal Analytics and Google Analytics 4 simultaneously.
Do note that Google will sunset the old version (Universal Analytics) on July 1, 2023. After the sunset date, you won’t be able to track data in Universal Analytics, so it’s better to create a Google Analytics 4 property starting today. For more details, please see our guide on how to switch to Google Analytics 4 in WordPress.
For this tutorial, we’ll be using the MonsterInsights Lite version as it includes outbound link tracking. There is also a MonsterInsights Pro version that offers more tracking features like eCommerce tracking and dashboard reports.
Upon activation, you’ll be redirected to the MonsterInsights welcome screen. Simply click the ‘Launch the Wizard’ button to set up Google Analytics in WordPress.
For complete setup instructions, see our step-by-step guide on how to install Google Analytics in WordPress.
Upon activation, MonsterInsights will start tracking outbound links on your website in Google Analytics. If you’re using the Pro version, then you can unlock the Publishers report and see which external links get the most clicks inside your WordPress dashboard.
To view the report, simply head over to the Insights » Reports page and then click the ‘Publisher’ tab. After that, go ahead and scroll down to the ‘Top Outbount Links’ report.
How To Set Up Affiliate Link Tracking In WordPress
For example, if use an affiliate link management plugin like Pretty Links, then you can make your affiliate URLs look like this:
However, Google Analytics doesn’t track these URLs as outbound links by default. This is where MonsterInsights comes in handy. You can specify the path for your affiliate links, and the plugin will automatically track them in Google Analytics.
To start, simply head over to the Insights » Settings page and then click on the ‘Publishers’ tab.
Now, you need to provide the path that you use for your affiliate links. This is the prefix added by your link cloaking or affiliate link manager plugin. For example, if you used ‘refer’ as the prefix, then go ahead and add it under the Path field.
After that, you need to provide a label for those links. This label will be added to your Google Analytics report and will help you identify those links in your reports. Don’t forget to click the ‘Save Changes’ button to store your settings.
Next, you can view your top affiliate links in WordPress using MonsterInsights. Simply go to Insights » Reports and click the ‘Publishers’ tab. Then scroll down to the Top Affiliate Links report and see which links your visitors click most often.
Viewing Outbound Link Reports in Google Analytics
Now that you’ve enabled outbound link tracking on your WordPress site, let’s see how you can view the reports in Google Analytics 4 and Universal Analytics.
Do remember that Google Analytics could take at least 24 hours to collect the data and show it in its reports.
Outbound Links Report in Google Analytics 4
First, you’ll need to login to your Google Analytics account and create a custom report to see your outbound link clicks.
To start, you’ll need to go to the Explore tab from the menu on your left and click the ‘Blank’ template.
Next, you can enter a name for your report under the ‘Exploration Name’ field.
After that, you’ll need to add dimensions for your custom report. Simply click the ‘+’ sign next to Dimensions.
On the next screen, you’ll see different dimensions. There’s also an option to search for dimensions at the top.
After that, you can look up the following dimensions in the search bar and click the checkbox to select them:
- Event name
- Link text
- Page title
Once you’ve selected these dimensions, simply click the ‘Import’ button.
You will now see them added under ‘Dimensions’ in your custom report settings.
Next, you can drag the ‘Link text’ and Page title’ dimensions and drop them in the ‘Rows’ section.
After that, you’ll need to add a metric to your report.
Go ahead and click the ‘+’ sign next to Metrics.
On the next scene, you’ll see different metrics that you can add to your custom report.
Simply select ‘Event Count’ under Event and then click the ‘Import’ button.
The event count metric will now be added to the custom report under the Metrics section.
You’ll then need to drag the ‘Event count’ metric and drop it under the ‘Values’ area.
Next, you’ll need to drag the ‘Event name’ dimension and drop it in the Filters section.
After that, you can select ‘exactly matches’ from the Filter dropdown menu and then type in ‘click’. Once you’re done, simply click the ‘Apply’ button.
In the next step, you’ll also need to add the ‘Outbound’ dimension to the Filters section.
When you add the outbound dimension, go ahead and select ‘Exactly matches’ from the Filter dropdown menu and type in ‘true’.
Don’t forget to click the ‘Apply’ button after entering these details.
That’s it. You’ll now see a custom report that shows which outbound links get the most clicks and from which pages.
Outbound Links Report in Universal Analytics
You can start by logging in to your Google Analytics account and going to the Behavior » Events » Top Events page.
You will see your outbound links listed as ‘outbound-link’ event category and your affiliate links will be listed with the label you added in plugin settings.
Next, you can click on the ‘outbound-link’ event, and it will show you the external URLs users clicked on your website.