How To Track Outbound Links Using Google Analytics In WordPress

How to Track Outbound Links with Google Analytics_

Every website owner comes across the term – outbound links. They play a significant role in enhancing the rankings of a website on the search engine result pages. These links take users away from the website to a new site which may or may not be related to the owner.

Almost every website owner adds outbound links to their website as they believe that it will significantly improve the rankings of the site and linking to quality sites demonstrates authority to readers. Just like keywords, over-stuffing the outbound links may result in degrading the ranking of the website. There is an easy method to avoid over-stuffing these links, and that is by removing all the non-performing ones. You don’t have to randomly remove the links as you can track the performance easily by using a tool known as Google Analytics.

Google Analytics does a lot more than just tracking your outbound links. You can identify the way your viewers interact with your website, the traffic growth, and receive some insight on what keywords you are ranking for.

If you are new to this tool, then here we present you a complete guide on how you can track the performance of the outbound links on your WordPress website.

Install Monster Insights

Step 1

We know that there are plugins available for your WordPress site which can simplify majority of the tasks. In the first step, you need to connect your website with the Google Analytics using a plugin. You need to install Monster Insights plugin which will allow you to connect your WordPress site to Google Analytics easily. Go to WordPress Admin > Plugins > Add New. Search for Monster Insights plugin, install and activate.

Step 2

Now that you have installed the Monster Insights plugin, you need to sign up for Google Analytics. Visit the Google Analytics signup page and login with your preferred Gmail account. If you don’t have a Gmail account, then you can quickly create one through here.

Google Analytics

Step 3

Once you have successfully logged in using your Google account, now you need to click on the Sign-Up button, and you will see two options asking whether you want to choose a website or a mobile app. You need to select the website as you will be monitoring the WordPress site.

Step 4

Upon selection, the tool will ask you some information about the account. You need to enter the:

  • account name,
  • the website’s name,
  • country,
  • website’s URL and
  • time zone.

After entering all the necessary information, press the Get Tracking ID button, and the tool will now display their Terms and Conditions before running the tool. Click on I Agree and the Google Analytics tracking id will be generated.

Google Analytics Configuration

Step 5

Now that you have installed the Monster Insights plugin and received the Google Analytics tracking ID, you need to open your WordPress admin dashboard and click on the Insights tab. Upon clicking, press the Settings button which will open the Plugin Configuration Panel where you need to press the Authenticate With Your Google Account button.

Step 6

Once you click the button, a new popup will appear where the plugin will ask you to authenticate your Google Analytics account with the plugin. To continue, click on the Next button and the plugin will ask you to get a Google code. You need to press the Click To Get Google Code button where the Monster Insights plugin will grant permission to access your Google Analytics data.

Press the Allow button and a new window will open with the unique authentication code. You need to copy that code and paste it into the plugin window and press the Next button.

Monster Insights Authentication

Step 7

Now that the installation process is complete, we should move on to tracking the outbound links. Navigate to your WordPress admin dashboard and open the Insights tab. Open the Settings section where you will see two tabs – General and Tracking. You need to scroll to the Engagement Section and select the Using JavaScript option in the Track Outbound Clicks and Download Links option and click on Save Changes button.

Step 8

By default, Google Analytics doesn’t track any affiliate links which most of the website users use in the form of outbound links. The Monster Insights plugin allows you to track all these affiliate links and fix this feature easily.

You need to head back to the WordPress admin area and open the plugin Settings. Now open the Tracking tab where you will see different sections to the left. You need to click on the Affiliate Links section and enter the path for your outbound links in the Set Path For Internal Links to track as outbound links section.

Step 9

Afterwards, enter the label for all your outbound links which will be added to your report. Once you have entered the label, click on the Save Changes button and you are now ready to track the performance of all the affiliate links as well.

Step 10

You need to wait at least twenty-four hours after enabling the outbound link tracking. During that time, Google Analytics will gather all the data about your website. After twenty-four hours, login to your Google Analytics admin area and click on the Behavior section.

Upon clicking, you need to click on the Events link and open the Top Events page. In the Events page, your outbound links will be named as outbound-link under the event category tab, and your affiliate links will be listed on the label you gave them during the configuration.

Step 11

To check the results, you need to click on the Label, and it will show you all the outbound URLs on which the users clicked. After clicking, you will notice three tabs: event action, total events and unique events. The Event Action will show you the links, the Total Events tabs will show you the number of times the user clicked, and the Unique Events will display each unique click.

Step 12

The Google Analytics tool offers a great feature which allows you to check the live status of the outbound links. To check the real-time activity, open your Google Analytics admin dashboard and click on the Real-Time page. Now click on the Events section where your outbound links and affiliate links will be mentioned under the Event Category tab. You can check audience visits live and whether they are clicking on the links or not.

Installing Google Analytics to Your Theme

Most of the beginner and intermediate users don’t know that they can add Google Analytics to their current theme. This method is known to the professional and knowledgeable users mainly because it requires an understanding of the website coding.

Method 1

To add Google Analytics to your current theme, you need to open your WordPress directory. You can easily do that by logging to your host account through an FTP client. Once you have successfully logged in, you need to open the wp-content folder and then the Themes folder.

The themes folder will contain all the files of your current theme and other installed themes. Now open your current theme folder where you need to edit the header.php file. To edit the file, you need to right-click on the file and Download it on your local system as a backup. Open the file using the text editor visible in the cPanel and paste the earlier copied code after <body> tag and save the changes.

Method 2

There is another method to integrate Google Analytics code to your website which is by using the functions.php file. This file is also located in the same directory and the editing process is same as well. Using this method will add the code to all the pages of your website. All you need to do is open the file using a text editor and add the following code to the file and save changes.


add_action(‘wp_head’, ‘wpb_add_googleanalytics’);

function wpb_add_googleanalytics() { ?>

// Paste your Google Analytics code

<?php } ?>

Save the file changes and give it 24 hours for Google Analytics to start tracking and analysing visitors on your website.

All About Google Analytics

The features of the Google Analytics is not limited to providing details on your website’s outbound links. This tool can provide you with tons of other details on the SEO status of your site. You can easily monitor all the data on your website by visiting your Google Analytics dashboard and clicking on the Reporting button. Other data which you can monitor using this tool is mentioned below:

#1 People’s Behaviour on Your Website

One great feature of this tool is that it allows you to check what the people are searching on your website. People reach to the website either by using the keywords or they already know about your website.

By knowing what the people are looking for your website, you can modify your site to provide what the consumers are really looking for. This feature will allow you to expand your website and add all the data which is currently missing.

#2 Geolocation of the Users

Google Analytics lets you know the geolocation of your users. With the help of this information, you can customise your website as per the regional requirements of the users. Sometimes the users prefer those websites which have their native language. By knowing their location, you can add that language to your website and help in gathering more users from that area. In addition to that language, you can also customise your ad campaigns for a specific country or region.

#3 Know the Best and Poor Performing Pages

With the Google Analytics tool, you can identify your best-performing pages. All those pages on which the visitors stay the most and have the lowest bounce rate falls under the best posts category. Similarly, all those pages on which the users stay the least and have the maximum bounce rate come from the poor performing pages category.

This detail will allow you to know which pages require changes and which pages don’t need any change. It eliminates the chances of making changes on the wrong page which may affect its ratings on the search engine result pages.

#4 Identify and Analyze Campaign Performance

People use different marketing campaigns on their website to make it widely popular. This tool helps you in identifying which campaign is the most successful and brings the maximum traffic to your site.


Tracking the performance of outbound links is necessary for optimising your website for search engines. With the help of this method, you can easily track all the outbound and affiliate links without worrying about the data loss.

Leave a Reply

Your email address will not be published. Required fields are marked *

Best WordPress pet or animal themes

20 Best WordPress Themes for Animal and Pets Site


14 Best WordPress Resume Themes for Creating Online CV