Join 1,000,000+ using SeedProd to build Landing Pages in minutes!

Get Started

How to Set Up Link Tracking in WordPress (the Easy Way)

Posted by Stacey Corrin on November 20, 2020

Do you want to track links and button clicks in WordPress?

Setting up link tracking for WordPress helps you learn how people use your website. With that information, you can then plan a strategy to improve your site’s user experience, click-through rates, and conversions.

In this tutorial, we’ll show you how to set up link tracking in WordPress, so it’s easy to get the data you need for growing your business.

Buttons and links are two of the main ways people interact with websites and content online. Plus, it’s those elements that lead users to take action, such as:

Learning how people use the different elements on your website helps you know what is and isn’t working. For example, if people aren’t clicking your subscribe button for your newsletter, you can find out what’s stopping them from doing so.

You can also use link tracking for your affiliate links. For instance, you can learn which affiliate links people click more than others.

With the insights you gather from tracking links in WordPress, you can make decisions about your business based on real data to drive its success.

Now that you know why tracking links on your website is important let’s learn how you can easily set it up in WordPress.

One of the best tools for collecting data about your website activity is Google Analytics. Yet, even though it has improved over the years to be less complicated, it’s still an intimidating tool for beginners.

That’s why, for this article, we’ll be using MonsterInsights, the best Google Analytics plugin for WordPress. It gives you the ability to easily set up Google Analytics and helps you get the most from the broad range of data it collects.

MonsterInsights best WordPress Googel Analytics plugin

Besides adding a simple analytics tracking script in your website footer, MonsterInsights adds the correct event tracking to all the links, buttons, cart areas, etc. on your site. Plus, it shows you easy to understand reports right inside your WordPress dashboard.

There’s a free version of MonsterInsights for website owners who want to try it out. But you’ll at least need the Pro version to make use of all its’ powerful tracking features.

Adding MonsterInsights to WordPress is also super-easy.

First, install and activate the MonsterInsights plugin. If you need help with this step, follow these instructions for how to install a WordPress plugin.

After activating the plugin, head to Insights » Settings and enter your license key.

Enter your MonsterInsights license key

Then scroll down to the bottom of the same page and click the Launch Setup Wizard button.

Click the Launch Setup Wizard button to connect your site to Google Analytics

You can then follow the instructions in the launch wizard to connect your website to Google Analytics.

If you need more detailed instructions, you can follow our step-by-step guide on how to add Google Analytics to WordPress.

The MonsterInsights setup wizard will automatically install all the right tracking settings based on the type of website you own.

Now that you’re all set up let’s explore the different ways you can set up link tracking in WordPress.

Many WordPress websites use affiliate marketing to monetize their content. So it’s your job as an affiliate marketer to learn what your affiliate links are doing.

While it’s possible to track your earnings from third-party websites and resources, this won’t give you a full picture of how people use your affiliate links.

For that purpose, many affiliate marketers use link cloaking plugins to create shorter links they can manage inside WordPress. Usually, the link will look something like this:

https://youwebsite.com/refer/awesomeproduct/.

But the best thing is, MonsterInsights makes it easy to track those affiliate links right inside WordPress.

All you need to do is head to Insights » Settings from your WordPress admin area and click the Publisher tab at the top of the page.

enter you affiliate link prefix to track affiliate links with MonsterInsights in WordPress

You’ll then see an area where you can add your affiliate link prefix.

After that, click the Save Changes button to store your settings.

It may take a few hours to collect your data. When it’s ready, you can see your affiliate link insights in the Publisher report section, which you can find by navigating to Insights » Reports in WordPress.

View your affiliate link tracking reports in MonsterInsights

Outbound links in WordPress are links that point to external websites. They could also be uncloaked affiliate links, links to other websites you own, or links to your partner websites.

MonsterInsights will automatically track all clicks on your outbound links. It’s easy to view them by navigating to Insights » Reports and clicking the Publisher tab at the top of the page.

View outbound link tracking reports in WordPress with monsterinsights

If you notice many clicks to external websites, it might be a good idea to contact them. You could set up a mutually beneficial partnership for both sites, like sponsorship or affiliate partnerships.

3. eCommerce Tracking in WordPress

If yours is an eCommerce business that uses WooCommerce, you can take advantage of MonsterInsights’ detailed eCommerce tracking features. To do this, you’ll need to enable eCommerce tracking for your website.

First, visit your Google Analytics dashboard and click on the Admin icon in the bottom-left corner.

click the admin view in google analytics

Next, click the eCommerce Settings option in the right-hand column.

Click the ecommerce settings option in google analytics

You’ll then see a screen with the option to turn on eCommerce tracking and enhanced eCommerce tracking in Google Analytics. After enabling those options, click Save.

Turn on enhanced ecommerce tracking in goole analytics

After that, you can enable the MonsterInsights eCommerce addon.

To do that, navigate to Insights » Addons from your WordPress dashboard and scroll down until you find the eCommerce Addon. Click the Install button to install the addon and activate it on your website.

lnstall the monsterinsights ecommerce addon

Next, head to Insights » Settings and click the eCommerce tab at the top of your screen. On this page, turn on the Use Enhanced eCommerce option.

enable enhanced ecommerce tracking in monsterinsights

MonsterInsights will automatically detect any eCommerce software installed on your website and will enable tracking for it.

To view your eCommerce tracking reports, head to Insights » Reports and click the eCommerce tab at the top of your screen.

ecommerce link tracking reports in monsterinsights

At the top is an overview of all your eCommerce conversions. Underneath are the top referral sources and the conversions and revenue for each source.

ecommerce transaction reports in monsterinsights

Analyzing this data will help you discover which referral sources you should capitalize on and those that aren’t doing so well.

4. Tracking File Download Button Clicks in WordPress

If you run a membership website that sells digital products and downloadable content, then tracking your file download buttons will help you learn how users interact with your files.

MonsterInsights tracks file downloads automatically for popular file types such as:

  • PDFs
  • Spreadsheets
  • Documents
  • Presentations
  • Zip files

But if there are other file types you wish to track; you can easily set it up.

To do that, head to Insights » Settings and click the Engagement tab. Then scroll down to the bottom of the page to the File Downloads section.

add file extension types to file tracking in monsterinsights

In this area, you can add the file extensions you wish to track. Remember to click the Save Changes button when you’re done.

Viewing your file download statistics is just as easy. Just click Insights » Reports and click the Publisher tab.

File download clicks reporting in monsterinsights

5. Tracking Form Submit Button Clicks in WordPress

Forms are an important part of any website. They’re used for newsletter signups, product purchases, orders, and contact forms.

You need to learn how people interact with your forms to see what is and isn’t working. Plus, looking at your form data will help you see which forms convert the best and which ones need more work.

To track form submit button clicks in WordPress with MonsterInsights, head to Insights » Addons. Then install and activate the Forms addon.

Activate the monsterinsights form addon

After installing the addon, MonsterInsights automatically finds all the forms on your website and will start collecting interaction data.

The addon works with all popular WordPress form plugins like WPForms, Formidable Forms, etc.

Once MonsterInsights has gathered enough data, you can view your form reports by heading to Insights » Reports and clicking the Forms tab.

MonsterInsights form clicks and form conversion reports

While tracking your form conversions is a great way to learn how people interact with them, not everyone uses a form to get in touch with your business.

This is why it’s also important to track links for your phone number and email address.

In most websites, any clickable links to your phone number start with tel: and they’ll normally look something like this:

<a href="tel:123-456-789">Click here to call us</a>

Clickable links to email addresses start with mailto: and might look something like this:

<a href="mailto:yournme@yoursite.com">Click here to email us</a>

The great thing is MonsterInsights tracks clicks for tel and mailto links automatically.

You can see all the details in the Event Category view inside Google Analytics.

mailto and telephone link tracking in google analytics with monsterinsights

If you click any link in that view, you can see links’ content. This gives you an easy way to track tel and mailto links for various phone numbers and email addresses on your WordPress website.

By now, you’ve learned how to set up link tracking and track link and button clicks in WordPress. But what if you have a specific custom link you want to track and create custom reports for?

MonsterInsights can help you with that too, with the attribution feature.

To set this up for any link on your website, just switch to the HTML view in the WordPress block editor and add your link in this format:

<a href="https://www.example.com" data-vars-ga-category="Call to action clicks" data-vars-ga-action="CTA link click" data-vars-ga-label="Homepage CTA clicks">My custom link</a>

As you can see, the above link has 3 new link attributes, including:

  1. data-vars-ga-category: to create a category for your link
  2. data-vars-ga-action: for describing the action the link performs
  3. data-vars-ga-label: A label that helps you identify the link

You can find the reports for custom link tracking in the Behavior » Events Section of Google Analytics.

That’s it!

We hope this article helped you learn how to set up link tracking in WordPress. Now you can track everything from affiliate and outbound links to button clicks, form downloads and eCommerce activity.

Since we’re on the topic of tracking, you might also like to learn how to track logged-in user activity in WordPress.

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

Using WordPress and want to get SeedProd for free?

Enter the URL to your WordPress website to install.


Easily Create High Converting WordPress
Landing Pages with SeedProd

Get SeedProd Now