How to Set Up Affiliate Link Tracking in WordPress

Do you want to maximize your affiliate revenue? And do you know which links get the most clicks?

By tracking your affiliate links in Google Analytics, you can gather all the data you need to optimize your links for maximizing affiliate revenue.

But using Google Analytics can be tricky, especially for beginners. This is where MonsterInsights comes in handy. You can track affiliate link clicks on your website in just a few clicks.

In this article, we’ll show you how to set up affiliate link tracking in WordPress.

MonsterInsights is the best WordPress Analytics plugin. Get it for free!

Start Tracking Your Affiliate Link Clicks Today!

We’ve divided the post into different sections, so you can jump ahead to any part you’re interested in:

Let’s kick things off…

Video Tutorial

Not interest in watching the video? You can continue ahead and read the written step by step tutorial for tracking affiliate links.

Benefits of Using MonsterInsights for Affiliate Link Tracking

MonsterInsights is the best WordPress plugin for Google Analytics. It makes it very easy to set up tracking on your website and get actionable insights with easy to read reports, delivered straight to your dashboard. And it sets up WordPress event tracking right out of the box.

By using the plugin for tracking your affiliate links, you can gather all the data you need to optimize your links to make more money online.

With MonsterInsights affiliate link tracking, you can identify:

  • Traffic sources of your highest converting visitors, so you can focus on promoting your content where it gets you the best ROI.
  • Top earning pages where your affiliate links with the most clicks are placed, so you can optimize your highest-earning pages to make more money.
  • New content opportunities to earn more affiliate income.
  • Fine new keywords to get more visitors to visit your website and increase your chances of getting more clicks on affiliate links.
  • Use scroll depth tracking to find out how far a visitor reads your content and then place your affiliate links to get lots of clicks.

Before we dive into tracking your affiliate link clicks with Google Analytics, let’s take a look at why it is essential to cloak and manage your affiliate links.

Managing Links With an Affiliate Link Plugin in WordPress

benefits of affiliate link tracking wordpress
When you first start out as an affiliate marketer, you may find it easier to promote affiliate products by simply adding affiliate links in your blog posts.

Affiliate links are typically long, ugly-looking URL’s, like this:

As you grow as an affiliate marketer, you’ll likely use the same affiliate link on tons of different blog posts.

But what if the company you’re promoting changes your affiliate link?

You’ll need to dig deeper into every blog post you publish to find and replace the affiliate links you’ve added. Or else, you’re losing money. Obviously, that’s a tedious task.

That’s when link management comes in handy.

Pretty Links – Best WordPress Plugin for Managing Affiliate Link


Pretty Links Pro is a powerful WordPress affiliate link management plugin. You can organize all your affiliate links in a single place, so finding and replacing won’t be a hassle.

Apart from that, it also allows you to cloak your affiliate links, so you can turn your ugly affiliate links into more shareable and readable links. Best of all, using Pretty Links, you can easily track and optimize your affiliate links with Google Analytics.

Here are other amazing features offered by Pretty Links Pro:

  • Offers advanced redirect types
  • Auto-link keywords
  • Get 1 year of support and updates
  • Priority support for Supper Affiliate package users
  • Auto-create pretty links
  • Add head scripts to your URL
  • Dynamic redirection
  • Create categories and add tags
  • See reports
  • Import and export your affiliate links

If you’re an affiliate marketer who is not still using an affiliate management plugin, then you’re missing out a cool opportunity to better organize, track and manage your affiliate links.

Now let’s see how to set up affiliate links in WordPress using Pretty Links.

How to Set Up Affiliate Links in WordPress

Pretty Links offers amazing features that make managing affiliate links very easy. Here’s how you can use the plugin to organize your affiliate links in your WordPress website.

Step 1: Install Pretty Links Plugin

To install the Pretty Links WordPress plugin, go to your website’s dashboard and then click Plugins >> Add New. Then search for Pretty Links and click Install Now.


Once you install the plugin, it should appear in your WordPress dashboard. Click on Pretty Links to view their welcome screen.

Step 2: Add a New Affiliate Link to Pretty Links

Next, click Add New to enter an affiliate link to Pretty Links.


Step 3: Edit Your Affiliate Link

First, give your affiliate link a name and then move on to the settings.

Pretty Links offers three settings to edit your affiliate link: basic, advanced, and Pro.

In the Basic settings, you can select the type of redirection you want (301, 302, 307), enter your target URL, set your own customized Pretty Link, and add a note if you want.


Advanced settings let you select a no-follow and no-index tags for your link, parameter forwarding, and setting up tracking.


Pretty Links Pro offers more options for customization. You can set the links to expire after a certain date, add a list of keywords that you want to automatically replace in a post or page.

It even offers automatic replacement of URLs and dynamic redirection. You can also enter tracking scripts such as Google Analytics or Facebook pixels in the affiliate links.


Once you’ve entered your settings, click Update in the top right corner.

If you go back to your Pretty Links dashboard, you can now see the newly added affiliate link.

Now that you know how to create affiliate links, let’s find out how to set up affiliate tracking in Google Analytics.

How to Track Affiliate Links in Google Analytics

 Step 1: Install MonsterInsights

The best way to track affiliate links in WordPress is by using MonsterInsights. MonsterInsights allows you to set up affiliate link tracking in WordPress with just a click – no need to modify your Google Analytics code.

To get affiliate link analytics on your site, go ahead, and Install MonsterInsights. After installing and activating the plugin, you’ll need to connect it with Google Analytics.

Read the step by step guide on how to properly set up Google Analytics using MonsterInsights.

Step 2: Set Up Affiliate Links Tracking

Navigate to Insights » Settings, and click on the Publisher tab at the top of the page, and then to the Affiliate Links section.


You’ll now see 2 fields on the page.

1. Set path for internal links to track as outbound links:

This field allows Google Analytics to differentiate your affiliate link clicks with other clicks. For example, if you’re using an affiliate link management plugin, this is how your affiliate link will look like:

In the above example, your affiliate link begins with /recommends/ or /go/ or /refer/.

You can simply copy the prefix /recommends/ on this field, so Google Analytics can identify which internal links are affiliate links. If you use multiple prefixes, you can separate them with a comma: /recommends/,/out/ and so on.

2. Label for those links:

The label in your Google Analytics report lets you identify where the click came from. For example, you can add a label aff or affiliate to your links. The label will be added to the end of your page URL, like outbound-article-aff.

After filling in these 2 fields, you can click Save Changes.

How to Find Your Google Analytics Affiliate Traffic Stats

MonsterInsights lets you track affiliate clicks as events in Google Analytics.

To find an overview of your affiliate link clicks report, you can go to Behavior » Events » Overview.

affiliate link clicks report

You can also find top events and pages report just below the Events tab.

Additionally, customers of our Plus Tier and above get their own affiliate link tracking right inside WordPress in their Publishers Report!


That’s it!

You now know how to manage affiliate links using Pretty Links and how to track affiliate links using MonsterInsights in WordPress.

Start Tracking Your Affiliate Link Clicks Today!

We hope this article helped you set up affiliate link tracking in WordPress. If you’re also monetizing your blog with AdSense, you can learn how to optimize your ads using Google Analytics.

Are you ready to try the best Google Analytics plugin for WordPress? Get started with MonsterInsights Pro today! Track your affiliate links and see the reports inside your admin area.

And don’t forget to follow us on Twitter and Facebook for more Google Analytics tutorials.

Want to Try MonsterInsights for Free?

Enter the URL of Your WordPress website to install MonsterInsights Lite.


Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

This form is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.