Authority Website Income
Shares

How to ACTUALLY set Up Google Analytics Click Tracking – Affiliate Links and External Clicks – Step by Step Guide

I need to be able to be able to record in Google Analytics each click on an affiliate or non-affiliate external link so that I can:

  • Identify the traffic sources for my highest converting visitors
  • Identify new content/affiliate program opportunities
  • Identify my affiliate links/pages that result in the highest click through rate

You would think the above would be easy but after several years online, visiting a lot of sites supposedly showing me how to do this and talking with lot of people I believe there are very few people online who can answer the following question about visitors to their website…

Where are your top 5 earning affiliate links located on your site and where do people that click on them come from(Google, Facebook, Twitter, Another Website)?

Using the steps outlined below I now can come closer than ever to answering that question. This tutorial uses only Free Tools and will hopefully show others how they can as well. We will be using 3 free tools for this…

  1. Google Analytics
  2. Google Analytics Plugin by Yoast
  3. Simple URL by Studiopress or Pretty Link plugin

Credit to Yoast for his article here, much of my strategy is based on his work and his excellent analytics plugin.

Also, if you are really interested in getting all the data you may want to see the paid services of GetClicky and HubSpot provide a lot of detailed lead and click tracking.

 

Why Track Outbound Non-Affiliate Clicks In Google Analytics?

By tracking outbound clicks you are able to understand what websites you are sending your visitors to and potentially identify a matching affiliate offers to send them to instead. Or it can generate post ideas knowing what information your visitors are going to when they leave your site.

For example if I learn 10 people per day are going to a website I linked to through a non-affiliate link about the best chequing bank account for students I can do one of two things

  1. Change the link out for an affiliate link to the best bank account for students
  2. Create a similar student bank account review post and direct them their

Once you understand where your customers are going when they leave your site you can do a better job of directing them to options that improve the total value for both parties (you & them).

 

Why Centrally Manage Affiliate Links?

Affiliate links are typically ugly long looking URL’s, like the example below, that can be unwieldy when you are copying and pasting them into different locations on your website. By using a URL shortner you can get an easier to use URL.

PLUS – You can handle affiliate program changes with ease! For example on my authority site (My Case Study Website URL is Now Hidden) I send people to a free credit check offer through an affiliate link. In the future the affiliate program I want to send people to may change and since I manage all my affiliate links from a central location I will only need to go back and change the destination URL for my shortened /click/credit-check. If I just entered the affiliate link directly into each article I would have to go back and find every instance of the link and change it.

This can be a huge time saver when an affiliate changes who they run their affiliate program through, this way you will only need to change to the new affiliate link in one location not potentially 100’s.

  • Original affiliate link =
    • http://track.linkoffers.net/a.aspx?foid=15446843&fot=9989&foc=2&foc2=562920
  • Shortened affiliate link =

 

Why Cloak Affiliate Links?

SEO Benefit – I could put some words here but lets take it from someone smarter…

Yoast“Google will always say they won’t penalize you for affiliate links per se, but for thin content around it. I can make this into a long story, but let’s make it short: there’s very good reasons for me and several other highly respected SEO’s and affiliates around the world to think otherwise. “

http://yoast.com/affiliate-links-and-seo/

 

 

How to Track Clicks in Google Analytics – Step by Step Tutorial

Set Up Affiliate Link and External Link Click Tracking With WordPress and Google Analytics

I am assuming you have WordPress installed and your Google analytics code, now follow the 3 part plan below…

  • Part 1 – Cloak Affiliate Links
  • Part 2 – Track Affiliate Link Clicks in Google Analytics
  • Part 3 – Track Non Affiliate Link Clicks in Google Analytics

 

Part 1 Cloak and Manage Affiliate Links

 

  • Install Simple URL Plugin or Pretty Link Plugin (I will use the Pretty Link Plugin)
    • Pretty Link Plugin

 

  • Decide on a prefix to use for all your affiliate links
    • yoururl.com/go/afflink1
    • youturl.com/click/afflink1
    • yoururl.com/recommends/afflink1
    • I will be using the prefix “click”

 

  • Write down all the affiliate links you have on your site or plan to have on your site. I used a quick table in excel to think this through. Thinking through your affiliate offerings before your start making the links can really help in structuring the URLs in a logical way.

Affiliate

The settings I use for all affiliate links are as follows…

    • 301 Redirect
    • “No Follow”
    • Track Hits
    • Assign to a group if it makes sense for your tracking purposes 

Add Links

  • More Advanced Step (can be skipped) – The 301 redirect may still allow Google to identify the link as an affiliate, the “Nofollow” you selected in the step above should stop that from happening. However, if you want to be sure you can add a single line to your robots .txt file…
    • Disallow: /click/
    • Or instead of click use whatever pre-fix you are using for your affiliate links

 

  • Copy Link and insert it into your website as required (most time consuming step!)
    • TIP – SEO Smart Links plugin can do this automatically – I don’t use this but some people swear by it.
    • TIP – Entering a key affiliate link using the Quick AdSense plugin just above or below any ad block can be profitable

Adsense Ads

Part 2 Track Affiliate Links in Google Analytics

 

 

  • IMPORTANT Update the Google Analytics Plugin to Track Your New Affiliate Links
    • This plugin is great and makes it very easy to track links to an internal cloaked affiliate link. Simply do as the picture below shows and it will start tracking every time someone clicks on one of those affiliate links as an event in Google Analytics.

Affiliate Link

Part 3 Track External Link Clicks in Google Analytics

 

  • Ensure Google Analytics Plugin is set to track external link clicks

Downloads

2 Findings from My New Data worth Potentially $1000’s!

You may be wondering why go to the effort above well now I can take the following actions…

  • FINDING – Facebook Converts Better than Anything Else! – Even though Facebook sends the 40th most traffic as a referral to my site it was the source that generated the 2ndmost affiliate link clicks.
    • ACTION – I had it on my to-do list to better utilize Facebook but based on the conversions I need to bump it up my to-do list and start soon.
    • I need to be careful since the sample size is relatively small and the statistical significance would be well under 95%+(but I don’t feel like doing a Chi Square test to confirm). After some more data comes in I will revisit to confirm.

Referral Traffic Sources:

Referral Traffic Sources

Event Tracking Conversions by Source

Event Category

 

  • FINDING – Missing Out On Affiliate Sales– In the last 30 days 51 people have clicked from my site to two institutions that provide student loans and I have no affiliate relationship with them.
    • ACTION – I will approach both to see if I can join an affiliate program and if not potentially look at replacing the link on the articles to an institution I have an affiliate relationship with(as long as it doesn’t affect user experience).

Link

Final Tips

TIP – Jet Pack for WordPress can track external clicks but it does not have the same level of detail as Google Analytics.

TIP – Do not “no-follow” ALL your outbound links & Do not only have affiliate links on your website. Both of which are indications to Google of a low quality site.

 

This is my new method for tracking my affiliate link and non-affiliate link clicks.

I know there are people more advanced with more advanced systems set up and I would like to learn from them. If you have a system set up for tracking clicks, conversions, sources etc that puts mine to shame please share it in the comments!

About the Author Authority

Leave a Comment:

25 comments
Theodore Nwangene says January 9, 2013

Hi Jon,
I’m really enjoying your writings, I’ve learnt a lot from you in the past year and i know i still many cool things to learn from you this year especially as I’m about to start creating a new blog.

I didn’t know we can use Google analytics for such an awesome task before and that makes this post a very handy one.

Thanks for sharing man.

BTW: I just mentioned you on my blog.

Reply
    Jon Haver says January 9, 2013

    Thanks Theodore, great list you have, thanks for including me!

    Reply
Duncan says January 12, 2013

This is definitely taking the tracking a step further than I have ever taken it, I think there is a lot of value in being able to track this the way you are showing!

Reply
    Jon Haver says January 13, 2013

    Hi Duncan, this is definitely taking it further than I have in the past as well, however there is clearly some room for me to improve on the above. I am now getting the raw data but the next step is to set up some improved goals in Google Analytics and actually start split testing to improve conversions.

    Reply
      Phil says November 5, 2013

      Hey Jon,
      any updates or a new guide how to track further/ do split testing?
      Cheers,
      Phil

      Reply
Daryl Mander says January 12, 2013

Hey Jon,
Regarding having Adsense and affiliate offers on your site, I thought you might find this interesting:
http://www.flipfilter.com/blog/2010/10/29/adsense-site-monetisation-problems/
Basically, on the sites they surveyed, they found that having both affiliate and Adsense on sites actually yielded a lower revenue per user than either Adsense or affiliates in isolation. Obviously this is an average result but interesting nonetheless and I wonder if you’ve tested having just one or the other?
PS thanks for sharing the post, useful info as ever!
Daryl

Reply
    Jon Haver says January 13, 2013

    Hi Daryl, very interesting article. Thanks for sharing! I did test just having AdSense and it continued to perform poorly. I have switched to only having affiliate links on the site and there so far it looks like it is outperforming the combination of AdSense and Affiliate Links. In addition the site does not appear as “monetized” which helps when attracting links from other sites that don’t like to link to sites that are simply trying to make as much money as possible.

    Really appreciate the useful link…thanks!

    Reply
      Dale P @ poyserdk says September 3, 2013

      It does seem like having affiliate and adsense ads on your site could lower the effectiveness of both. I have not had much success with affiliate sales but I’ve had pretty good success getting referrals through my sites.

      I find that certain types of sites/articles are good for certain types of offers. CPA offers make the most but i have not been able to find something that works best for me.

      Also most CPA companies need you to have a certain amount of traffic before approving you.

      Seems that people are getting blind to Adsense ads so I expect the other PPC companies like media.net and chitika to start getting more popular. Although, I heard bad things about media.net not paying.

      What are your thoughts on Adsense alternatives?

      Dale

      Reply
Jose says April 17, 2013

Hi!

I think currently Pretty Links and Google Analytics for WordPress (or Google Analyticator) don’t work…

Reply
    Jon Haver says April 17, 2013

    It seems to be working for me…feel free to email me with more details if you are having problems and I will try to help.

    Reply
Robert Gomez says April 18, 2013

Hi Jon I am trying to follow the steps for this but I am having inserting the affiliate links into my site. Do I use the pretty link or do I need coding for it? I tried to use the adsense plugin but it only it seems to work with code.

Reply
ThomasPaul says June 25, 2013

Hi Jon,

Thank you for this in depth post. I just started looking into event tracking with google analytics today and your blog post has been the one most closely related to what I’m trying to accomplish.

I have been using the function built into my wordpress theme to add the analytics code, but I think I will go ahead and install the google analytics plugin as it seems to be the most elegant solution I’ve come across so far.

How granular can you get on the “Internal Links To Track As Outbound” section of the plugin? I see from your screen shot that you can add multiple prefixes. Can you have multiple labels as well?

Will it automatically tell you the website the outbound link goes to?

Thanks for your help,

Thomas

Reply
    Jon Haver says June 26, 2013

    Hi Thomas, thanks for the comment. I have never set up the tracking beyond one level ie /click . This has been sufficient for me. The way I get more granular in knowing which link from the same page went to an affiliate offer is like this…

    /click/affiliate-offer-1-page-1-location-1
    /click/affiliate-offer-1-page-1-location-2
    (with both going to the same page)

    This way I can see how many people went from exactly which link. This takes some time to set up and I don’t always do it since my traffic isn’t large enough to really do split tests on internal pages.

    Hope this helps but if you have questions let me know.

    Jon

    Reply
Fernando says June 30, 2013

Great article Jon!

But how would you track two affiliate links in a single website? I am saying that because there is only one Label to use in Yoast’s google analytics.

Thank you!

Reply
    Jon Haver says July 3, 2013

    You can use prettylinks lite to track multiple affiliate links. The single label only tells Google Analytics to track all links with the “single label” to record as an event….

    ie

    yoururl.com/singlelabel/link-1
    yoururl.com/singlelabel/link-2

    This will result in 2 events called link-1 and link-2 able to be recorded whenever one is clicked on.

    Reply
Christian says September 2, 2013

Great article! I’m currently using this setup (Pretty link lite) on one of my affiliate websites and wonder if it’s easy to also add this event tracking as goals in analytics as well. What approach do you suggest for this?

Br,
Christian

Reply
    Jon Haver says September 2, 2013

    Hi Christian, yes you can set up goals for this. I actually haven’t done it very often since you can dig into the events just the same…but I am sure an Analytics super user would shame me for saying that. If you do set these up as goals and find real value in doing so let me know I would be interested to know.

    Reply
Dale P @ poyserdk says September 3, 2013

I’ve been using affiliate link cloaker as my link cloaking tool. I wonder how it would affect my rankings if I used the pretty link plugin and activated the “no-follow” feature.

I will have to keep this in mind.

I will also play around with the CTR-widget

I’m already using Quick Adsense on a few of my sites and I find it to be very easy to set up and use.

Reply
Ben says September 1, 2014

Hey John,

Great post. Really helpful, thank you!

Just one question – Did you find that the tracking outbound links setting on SEO Yoast messed with your bounce rates at all? I set it yesterday afternoon and since then my bounce rate has plummeted to 30% for yesterday and is currently at 0% for today. While I’d love to believe that this is accurate, I’m guessing the plugin is somewhat to blame!

Reply
nj says May 6, 2015

Google is a great tools which can be useful for tracking traffic to your website but for purchasing traffic i needed a tool which was more in dept to help me track my conversions and how i was spending. i found this tool to be useful for me. http://www.imsuccesstoday.com/product-reviews/qccr/

Reply
Bart Houtman says August 31, 2015

Hi John! How are you? I like your writings as i used it in the past some times, including this article. I now built Ivanhoe.io (http://ivanhoe.io) to push all my affiliate earnings into my google analytics. I am now going to make it available for all affiliate marketers around the world. So if you can check it out, and spread the word, i will be a happy man. If you miss affiliate networks integrated, i can built it on the fly!

Reply
Tyler says March 2, 2016

Hey Jon,
thanks for the post. The only problem that I found was that my overall visitors tracked by google analytics went way down when I did this. Do you know why this is? I thought that there was an algo update and I got hit 🙁 I did add two different paths to track and two different labels (seperated by comas) because I use two different cloaking plugins. thirsty affiliates and easyazon. Maybe you know why this is or have a solution? Thanks again 🙂

Reply
Khong Bowen says July 11, 2016

Hey Jon

Is Pretty Link plugin a free plugin, it seems you have to purchases from the site.

Reply
    Jon Haver says July 20, 2016

    yes they have a free option.

    Reply
Add Your Reply