Google Analytics doesn’t automatically track and report on which links people use to leave your site. How lame is that? When I worked for a small agency in Dallas, we had this data at our fingertips because we used log-file based analytics instead of GA. There were other upsides to Google Analytics, of course, but this one out-of-the-box feature made our SEO efforts much more potent.

Why Do You Need To Track Exit Links?

At some point, you want your efforts to generate revenue. As a blogger, you’re probably an affiliate for many brands & sites, including Amazon. But how do you know if visitors are interested in those links and products? How do you know whether your efforts are effective?

Imagine going to the trouble to share multiple links to 50 different products throughout your site, and only some of those links are getting used or generating profit? What if months passed and you had no idea? How would you even know if that’s true?

You could start by checking your Amazon Affiliate reports, but that would only tell you products that have actually been purchased and their conversion rates, which you’ll want to know. But what Amazon reports can’t tell you is how many of those clicks came from post A, post B, post C, or post D. If you share the same link on multiple posts or pages, you’ll want to know what the clickthrough breakdown is for each post.

Amazon reports also can’t tell you how many people left your post to visit an affiliate website vs a non-affiliate website. User behavior matters. The same number of links on your pages can either generate $500 or $5,000 per month, depending partly on whether your visitors actually use them to exit the page.

The First Step is To Know What They’re Clicking

Out of the box, you only know which page visitors are leaving from, and what path they took to get to that exit page. But you have no idea what they’re looking at once they’re gone. If that post has ten outbound links on the page, you have a 10% chance of accurately guessing where they’ve gone. That’s not very scientific.

Better to know precisely how many people exiting each page are clicking each link on the page. That will show you which links get no love at all and probably need to be removed. It will tell you whether the number of clicks to an external page measure up to the number of purchases from that third party product.

Optimize Your Resources Page

If you have a page that contains your top resources or recommended products, wouldn’t you like to know how much interest each product is generating? What if you could see user behavior, test copy and images, and see an uptick in clicks to revenue-generating content? Optimizing your Resources page via exit link analytics is a solid way to increase revenue over time.

So now we know there’s value in the data we’ve been missing. Let’s start to implement the solution.

How to Implement Exit Link Tracking

First, you’ll need to copy/paste the following code into your blog header. For Genesis child themes, you can go to Genesis > Theme Settings > Header & Footer Scripts. Paste the code below into the header field provided:

* Function that tracks a click on an outbound link in Analytics.
* This function takes a valid URL string as an argument, and uses that URL string
* as the event label. Setting the transport method to 'beacon' lets the hit be sent
* using 'navigator.sendBeacon' in browser that support it.
var trackOutboundLink = function(url) {
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){document.location = url;}

You’ll also need to add (or modify) the onclick attribute to your links. Use this example as a model for your own links:

<a href="" onclick="trackOutboundLink(''); return false;">Check out</a>

You’ll find the following instructions on Google’s Support site here.

How Do I Edit Hundreds of Outbound Links Quickly?

You can manually make the changes to each link to add this to the HTML of each link:

onclick=”trackOutboundLink(‘’); return false;”

Or, you can make bulk edits in one fell swoop. But be careful. Many Search and Replace plugins for WordPress can do a lot of harm if you make one misstep in its complicated settings.

There has to be a better way…

You might not have heard of my secret weapon yet. It’s gaining traction fast. It’s called The Blog Fixer. It’s the safest way to find and edit/replace because it has an undo button that prevents you from screwing the pooch permanently with a bad decision.

You can do it yourself or pay TBF as a service to handle bulk fixes for you. With The Blog Fixer on your side, you can have your exit link tracking up in no time.

Hope that helps. Let me know if you have any questions.

What About Tracking Clicks vs Sales on Amazon?

As Melissa pointed out in the comments below, you can get some really valuable data through Amazon Affiliate reporting. I typically use those reports to review best sellers, but conversion rate is an equally important metric worth tracking.

If 150 people click link A but only two people purchased, you have an opportunity worth testing. Is the copy surrounding the link(s) on your site super tight and clear? Is it obvious what they’re getting if they click? Could you try another product or accessory that speaks more directly to where the visitor is likely to be at if they’re clicking from this page?

Those types of tests can turn a $5/month profit into $150.

Amazon reports won’t tell you which page of your site is converting poorly, but you could split test to start if you’re sharing the same link on multiple pages. Leave the link alone on one post and swap it out with a different product (try cheaper, more luxury, better brand recognition, etc) and compare how they convert over a 30 day trial. It may take you a few tests to see a significant difference, but a few “right” changes leads to a lot more profit.

What Analytics Won’t Do For You… Yet

In an ideal world, you could track singular links from entry point on your site to conversion on the affiliate site. But that’s not going to happen. Most corporate affiliate dashboards don’t offer the level of granularity required to track unique links to conversions. You can track all the behavioral data on your site and all the conversion data on your affiliate dashboard and do your best to put two and two together.

If that level of guesswork annoys you (it bothers me too), your best path forward is to sell products on your own site. Once the products are sold on your website, you can track every single step of the visit from entrance to shopping cart to conversion, and know exactly how well each post and each link to the product is converting.

That’s a goal to aspire to for you budding control freaks. 🙂

But for now, I hope you find these tips on tracking Exit Links useful.

About the Author Daniel

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}


Book [Your Subject] Class!

Your first class is 100% free. Click the button below to get started!