There are many reasons why someone would want to track outbound links on their website or blog. Perhaps you’d like to present statistics to a sponsor about a link that they paid for, or maybe you are having a discrepancy with an affiliate company regarding clicks or tracking. Whatever the reason, tracking clicks on outbound links through Google Analytics is actually quite simple.
This post is written assuming that you have Google Analytics up and running on your site.
Here’s how to track outgoing links using Google Analytics:
1. Go into your HTML editor for a post.
Here’s what a normal link will look like:
Now, here’s what the new tracking link will look like (and I’ll break it down just below):
Ok, so what the heck does this mean? “trackevent” is prompting Analytics to track the “event” which will be named later. The next two are “outbound links” and “clicks”, which are what you want to track. If you’re only interested in tracking outbound clicks on specific links, LEAVE ALL OF THAT ALONE. You’ll want to change “Event Label” to a name that help you remember what you are tracking. The Event Label is what we will see in the reporting. I recommend using the name of the affiliate company and you’ll see why later.
2. Once you’ve added that piece of code to the end of your link, it’s time to test it. Open the post 3-4 different times, clicking the link that you are tracking each time.
3. Now it’s time to check the reports. Here’s how to do that:
Now, you’ll see this:
As you can see, we need more detailed results than this. So here’s what to do:
Now we’re looking at the total events (clicks) for each “Event Label” that we are using. You can see the tracking for the ones that I had set up for this post. The numbers are 100% accurate with my actual clicks.
4. Let’s dig deeper.
One thing you have to know is that you cannot delete events. So if you go about this the wrong way, your event tracking can get very messy.
I have 2 recommendations to avoid this problem. If you really get into this and decide you want to do it a lot, make a new Analytics profile, set up the tracking code and use it solely for event tracking. That’s if you’re really gung-ho about this. If you’d like to keep everything on one account, that’s easy too. I recommend setting up a different “Event Name” for each affiliate company whose links you want to track. ie. ShareASale, Logical Media, Commission Junction. This way, you’ll have a small handful of “Event Names” to track. You can track those events by post. So, let’s say you have an “Event Name” Commission Junction and you want to see separate tracking numbers from 2, 3 or 50 posts, here’s how to see the link activity for each post:
Now you’ll be able to see tracking results for each “Event Label” that you have created. The results will be shown separately for each page too!
That’s it! You should be able to track any outgoing links from your site with this tutorial.
In summary, the only thing about the link code below that you would change is the “Event Name” and the link location. Everything else should stay the same!
Got questions or comments? Fire away!