Want to know which affiliate links are really getting those clicks?
You might be unknowingly wasting a ton of time promoting links that get zero links, while a totally different product you barely think about is secretly generating lots of interest.
Knowing where your audience is clicking is the first step towards growing your affiliate income.
That’s why setting up reliable link tracking is so important. This simple process gives you the exact data you need to stop wasting time and start focusing on the affiliate links that truly interest your visitors.
In this complete guide, I’ll walk you through the exact system I use to track affiliate links inside WordPress. I’ll even show you how to build a custom report in Google Analytics 4 (GA4) to organize all that valuable click data for you, and how to track affiliate products in WooCommerce.
By the time you reach the end of this article, you’ll have everything you need to turn your traffic into consistent commissions.
Why I Track Affiliate Links in WordPress
Tracking your affiliate links lets you see exactly which recommended products your audience clicks on most often. This is the best way to know which products are performing well with your audience, which is absolutely crucial for running a successful WordPress site and making money online.
I’ve found that sometimes the product I expect to be the top seller isn’t, and another product ends up being a consistent earner. I can then focus my efforts on promoting the products that convert and stop wasting time on the ones that don’t.
This optimization is a huge part of maximizing your affiliate revenue. After all, you can’t improve what you don’t measure.
Tracking your affiliate clicks can also give you ideas for future content. For example, if a specific affiliate link related to email marketing service is getting a ton of clicks, you might create more in-depth content related to email marketing.

You can then promote the existing affiliate link within that new content, or partner with other email marketing providers to acquire additional relevant links.
In some cases, analytics might show that you’re consistently sending a high volume of traffic to a specific merchant. I’ve seen plenty of bloggers use that information to negotiate better commission rates, ask for exclusive deals for their audience, or even start a new, mutually beneficial partnership.
Setting Up Affiliate Link Tracking in Google Analytics
In my experience, the simplest and most effective way to track your affiliate links is by using the MonsterInsights plugin.

MonsterInsights is easily the most popular way to add Google Analytics to WordPress. It helps you properly connect your site to Google Analytics and set up advanced tracking without having to mess around with any code. For busy affiliate marketers, that’s brilliant.
To help you make money online, we won’t just be installing a plugin. Instead, I’ll show you how to set up a complete tracking system.
In this ultimate guide, I’ll walk you through all the essential steps:
- How to cloak your messy affiliate links using a free WordPress plugin.
- How to configure MonsterInsights to recognize and track those cloaked links.
- How to see a simple summary report directly in your WordPress dashboard.
- How to build a detailed custom report in Google Analytics 4.
If you’re using WooCommerce, then I’ll even show you how to create and track affiliate products within your online store.
By the time we’re finished, you’ll have all the data you need to turn your traffic into commissions.
Cloaking Affiliate URLs with a Dedicated Plugin
If you want to track your affiliate clicks accurately and keep your site looking professional, I highly recommend cloaking your affiliate URLs using a plugin.
Cloaking means taking that long, ugly tracking link provided by the merchant (often full of numbers and symbols) and turning it into a clean, short link that uses your own domain name.
Why Cloaking is Essential for Tracking
Cloaking is essential for tracking. Let’s imagine I have an affiliate link for a great cloud hosting service. The actual link might look long and confusing, maybe something like:
http://www.cloud-partner.com/track/linkID=601672&user=123456&code=49337.
Using a plugin like Pretty Links, I can redirect that entire link to a brand new URL on my own domain such as http://www.mybesttools.com/go/best-cloud-deal.
When visitors click the cloaked link, Pretty Links will instantly redirect them to the correct partner site.
To correctly track affiliate links, you need a consistent URL structure. For example, you can use Pretty Links to ensure all your cloaked affiliate links share the same path, such as /refer/.
Then, you can tell MonsterInsights to specifically track every click on the /refer/ path and collect all that data in one affiliate report.
Installing Pretty Links and Setting Up the Basics
As I already mentioned, Pretty Links is a popular affiliate link management plugin that lets you redirect all those complex affiliate links to a uniform, clean URL that has a consistent path.
Even better, you can use the free version of Pretty Links to track affiliate links in WordPress, so this is the plugin I’ll be using in this tutorial.
To get started, install the Pretty Links plugin from WordPress.org. If you’re not sure how to do this, then please see our guide on how to properly install and activate a WordPress plugin.
Once it’s active, you need to cloak your affiliate links. To do this, go to Pretty Links » Add New Pretty Link.

I always start by giving my link a clear, descriptive name in the ‘Add Title’ box. For example, I might call it something like ‘Cloud Hosting Link.’
After that, open the ‘Redirection’ dropdown menu and select the type of redirection you want to use.

‘307 Temporary’ is a very common choice. It replaces the messy original URL with a clean, cloaked URL that tells search engines that this link might change in the future.
This gives you the flexibility to switch affiliate partners or update the underlying destination URL without confusing search engine crawlers or hurting the search rankings you’ve built up on this page.
After making your selection, copy and paste the long, ugly affiliate link into the ‘Target URL’ field.
Then, type the URL you want to use instead into the ‘Pretty Link’ field. Remember to choose a path that’s clear and easy to remember, such as /refer/product-name or /go/product-name.
For example, if I wanted my final link to look like mycoolsite.com/refer/bluetooth-speakers, I’d just type /refer/bluetooth-speakers into that box.

Configuring Advanced Tracking and SEO
Next, select the ‘Advanced’ tab. This area lets you add attributes, which are essential for affiliate compliance and search engine optimization (SEO).
To start, I always check the box next to ‘No Follow’. This tells search engines not to pass any authority to the external site I’m linking to. Since the user is leaving my site, I don’t want to boost that external site’s ranking with my hard-earned authority.

I also make sure to check the ‘Sponsored’ box, so Google knows this is an affiliate link. It’s a good practice for maintaining transparency and compliance.
Finally, I check the ‘Tracking’ box. This tells Pretty Links to collect its own click data, which is a great backup for the data we’ll set up in Google Analytics.
![]()
Saving and Organizing Your Links
And that’s it! Just click the ‘Update’ button and the clean, trackable affiliate link is ready to use.

Simply repeat these steps to register all your affiliate links with Pretty Links.
The really cool thing about Pretty Links is that it lets you add multiple different paths and organize links exactly how you need. For example, I sometimes use an entirely different path for specific promotions or resources:
- I might use /deals/ for time-sensitive, rotating coupon codes.
- I might use /freebie/ for a link leading to a free eBook or resource from an affiliate partner.
This helps me a lot when analyzing link performance. If I want to see how my coupon codes performed compared to my standard affiliate links, I can easily filter my GA4 reports using that path name.
Alternatively, you can keep things simple and use the same URL path for all your affiliate links. It’s completely up to you.
Just make a note of the URL path (or paths) you’re using, as you’ll need to enter this exact path into MonsterInsights in a later step.
Setting Up a New GA4 Property (If You Need One)
Before we set up MonsterInsights, you need to have a Google Analytics Property ready.
A Property is essentially a container within your Google Analytics account that holds all the data from a specific source. In our case, that’s your WordPress blog or website.
MonsterInsights works by reading the data sent to your designated Property. Without a Property, you can’t record any of those valuable affiliate clicks.
To create this all-important Property, log into Google Analytics using your Google account email and password. With that done, click the ‘Admin’ icon in the bottom-left corner.

On this screen, click the ‘Create’ button.
In the dropdown that appears, select ‘Property.’

You can now give this Property a descriptive name, by typing into the ‘Property name (Required)’ field.
I always use something clear and descriptive, such as ‘My Affiliate Site Data.’

Then, choose the time zone you want your reports to use, and select your reporting currency. It’s important to set the currency now, so you can easily track your earnings later.
That done, click the ‘Next’ button.

Defining Your Business Details and Objectives
On the ‘Business Details’ screen, open the ‘Industry Category’ dropdown and select the option that best suits your website.
Next, click the ‘Business size’ option that matches your company’s scale.

After entering this information, click ‘Next.’
On the subsequent screen, select the objective you want to achieve such as generating leads or getting more sales.

After making your selection, click the ‘Create’ button at the bottom of the screen.
Setting Up the Data Stream
After saving the Property, you’ll need to set up a Data Stream. This stream is what actually sends the information from your site to the Property you just created.
Since you’re connecting to your WordPress blog or website, make sure you click the ‘Web’ button.

Under ‘Website URL,’ type in the address of the site where you want to track your affiliate links.
Under ‘Stream Name,’ give this data stream a descriptive title. I typically use my website’s name so it’s easy to find later.

When you’re happy with the information you’ve entered, click on the ‘Create & Continue’ button.
That’s it! You now have a working GA4 Property that you can use with MonsterInsights.
Getting Started with MonsterInsights
Once you’ve created a GA4 Property, it’s time to set up tracking in MonsterInsights.
First, you’ll need to install and activate the MonsterInsights plugin.
For this guide, I’ll be using the premium version of MonsterInsights, as you’ll need the Plus version or higher to use the affiliate tracking features. If you’re not sure how to do this, then you can follow our step-by-step guide on how to install and activate a WordPress plugin.
Upon activation, you’ll see a welcome screen. Just click the ‘Launch the Wizard’ button to start the guided setup.

The wizard will ask you to describe your website: is it a WordPress blog, a small business website, or a shop?
Select the option that describes your site the best, and then click ‘Save and Continue.’

Connecting to Google Analytics
Next, we need to connect MonsterInsights to Google Analytics. Go ahead and click the ‘Connect MonsterInsights’ button.

On the next screen, select ‘Continue & Connect to Google.’
This will redirect you to Google.

You’ll now need to sign into, or select the Google account that manages your Analytics profile.
After that, you’ll have to grant MonsterInsights permission to access your Google Analytics account data. If you’re happy to go ahead, then check the box next to each permission and then click ‘Allow.’

Finalizing the Connection
The next step is telling Monsterinsights which website profile to track. Open the dropdown menu and select the Property we created earlier in this article.

Finally, click ‘Complete Connection.’ MonsterInsights will now install the tracking code on your site.
Once it’s finished, the setup will ask you to confirm some recommended settings and specify which user roles can view GA’s reports. I typically leave this set to ‘Administrator’ but you can change it if you need to.

When you’re happy to go ahead, click ‘Save and Continue.’
The wizard will now show all the extra features you can enable. After reviewing this information, scroll down and click ‘Continue’ or ‘Skip for Now.’

Finally, MonsterInsights will confirm that your setup is complete.
Your site is now connected to Google Analytics, and you’re ready to start tracking your affiliate links.

Viewing Your Affiliate Link Performance
You’ve installed the tracking code, which is great. Now, I want to show you how to actually monitor your affiliate links in WordPress.
A quick note: Google Analytics can take up to 24 hours to process and display new data, so don’t worry if you don’t see results straight away.
The great thing about MonsterInsights is that you can track affiliate links directly in the WordPress dashboard. To configure this tracking, go to Insights » Settings. Then, click the ‘Publisher’ tab.
![]()
In the ‘Affiliate Links’ section, you’ll need to enter the URL path you set up in Pretty Links, such as /refer/ or /deals/.
Under ‘Path,’ type in the exact URL path you’re using. Then, add a ‘Label.’ This will appear in Google Analytics, so make sure it’s something clear and distinctive that you’ll remember.

If you created multiple URL paths in Pretty Links, then click the ‘Add Another Link Path’ button.
Then, repeat the same steps for every path you want to track.

You now have one last choice to make, and it affects how the link will appear in your Google Analytics reports.
You can choose whether the report should show the long, original Target URL (the messy merchant link) or the short, clean Pretty Link URL (the cloaked one using your domain).
I typically choose to display the cloaked, Pretty Link URL in my Google Analytics reports. That’s simply because the clean link is easier to read and understand at a glance, compared to a long string of numbers and symbols.
This helps me identify the product instantly without having to cross-reference anything.

With that done, click the ‘Save Changes’ button to store your settings.
How to View Your Affiliate Link Tracking Report in WordPress
With all that setup out of the way, you can now see your affiliate data directly in your WordPress dashboard, which is incredibly convenient. To take a look, go to Insights » Reports.

Then, click the ‘Publishers’ tab.
In the dropdown that appears, click on ‘Overview.’

Now, just scroll to the ‘Top Affiliate Links’ section to see a clear, straightforward list of all your most-clicked affiliate URLs.
This dashboard report saves me so much time. I use it for a quick, daily check to see which links are performing well and generating lots of clicks.

How to View Your Affiliate Link Tracking Report in Google Analytics
The MonsterInsights dashboard is perfect for monitoring your most popular links. However, you might also need to know the exact page the reader was on, when they clicked each link.
That way, you can identify the specific content pieces that are making you money. For example, you might find that a link placed in the sidebar is converting better than the same link in a long post.
To drill down into that level of detail, you’ll need to go back to Google Analytics and build a custom report, so let’s do that now.
To get started, log into Google Analytics and click ‘Explore’ in the left-hand menu.

On this screen, you’ll see some templates that can help you build new reports faster, such as Funnel Exploration and Path Exploration.
However, we’re going to create a custom report, so select the ‘Blank’ template.

First, you’ll need to give this report a descriptive name.
Under ‘Exploration Name,’ click the field that shows ‘Untitled Exploration’ by default. This makes the field editable. You can now delete this text and replace it with your own, descriptive title.

I usually name my report something clear, like ‘Affiliate Click Performance.’
Defining Dimensions for Affiliate Data
Next, it’s time to add your dimensions. Dimensions are descriptive attributes or a characteristic of your data, such as the type of device used, or whether the user is a first-time visitor.
To add these dimensions to your report, find the ‘Dimensions’ section and click its ‘+’ sign.

That done, you’ll need to click to expand the ‘Event’ section.
Then, check the box next to ‘Event Name.’ This dimension tells us the type of action that happened.

Next, click to expand the ‘Link’ section.
Here, check the boxes next to ‘Link text’ and ‘Outbound.’ This tells us the actual, visible text that the user clicked on each page.
![]()
Click to expand the ‘Page/screen’ section and select ‘Page title.’
This collects the name of the page where the affiliate link was located, so we can figure out which content is driving the most traffic.

After checking all these boxes, click on ‘Confirm.’
GA4 will now go ahead and add all these dimensions to your report.

Building the Report Table
Now, we need to create our table, so we can see each link and the page it appeared on.
To do this, find ‘Page title’ under the ‘Dimensions’ section. Then, drag and drop it onto the ‘Rows’ section.

Now, you need to do exactly the same thing with ‘Link text.’ That means finding the ‘Link text’ dimension, and then dragging and dropping it onto the ‘Rows’ section.
This makes each unique link text a separate row in our report.

After that, you need to add a metric showing how many times the click action happened.
To do this, click the ‘+’ sign next to ‘Metrics.’
![]()
In the panel that appears, click to expand the ‘Event’ section.
Then, check the box next to ‘Event Count.’

With that done, click ‘Confirm.’
This will add ‘Event Count’ to the ‘Metrics’ section.

Now, drag and drop ‘Event Count’ onto the ‘Values’ section.
Placing it here tells the report to display the total number of clicks for each combination of link text and page title.

Filtering the Report for Clicks Only
Now comes the important part: you need to tell the report to ignore everything apart from the affiliate clicks.
To do this, drag the ‘Event name’ to the ‘Filters’ section.

You can now choose ‘exactly matches’ from the dropdown.
In the box, type ‘click’ in lowercase and then click ‘Apply.’ This tells Google to only include data where the user specifically clicked on something.

With that done, drag ‘Outbound’ to the ‘Filters’ section.
Once again, open the dropdown menu and select ‘Exactly matches.’

Then, type in ‘true.’
Finally, click ‘Apply.’ This tells Google to only include links that are specifically leaving your site.

That’s it! You’ve successfully built a custom report that shows which pages generated clicks on your affiliate links.
Just keep in mind that the report is tracking clicks, which doesn’t necessarily mean the visitor actually went ahead and made a purchase.
How to Set Up WooCommerce Affiliate Link Tracking
WooCommerce supports affiliate products, meaning that the customer checks out on another site rather than your own.
If your online store features external products, then MonsterInsights is smart enough to track these links automatically, which is a huge time-saver. Since MonsterInsights hooks directly into the core WooCommerce settings, you don’t need to do any extra cloaking or manual setup for these specific product links.
To create an affiliate product in WooCommerce, go to Products » Add new product in your WordPress dashboard. You can then create the WooCommerce product as normal by adding things like a product name, a compelling description, and a product image.

When you’re happy with the information you’ve entered, scroll to the ‘Product data’ box.
Here, open the ‘Product data’ dropdown and choose ‘External/Affiliate product.’ This is the critical step because it’ll trigger MonsterInsight’s affiliate tracking features.

You can now enter the affiliate URL into the ‘Product URL’ field, and type in the call-to-action you want to display, such as ‘Visit Our Partner Site.’
Even though the sale happens externally, you can add the pricing information to help the customer decide whether this product is right for them.
![]()
With that done, go ahead and publish the product as normal. MonsterInsights will now automatically track clicks on that button as affiliate clicks.
To see which affiliate products are performing the best, just go to Insights » Reports » Publishers in your WordPress dashboard.
All your affiliate products are automatically included in the ‘Top Affiliate Links’ report. I check this report often because it quickly shows me which store listings are driving the most traffic to my partners.
Now you’ve set up your tracking system, you may need some extra help to tackle other essential tasks like installing themes or setting up a contact form.
In that case, you can check out our video tutorials. They walk you through everything, from the essential setup like installing plugins and creating pages, right through to the more advanced ways you can customize your site.
By mastering these essentials, you can continue to grow your site and boost your affiliate income.
Leave a Reply