Tracking Affiliate Clicks in Google Analytics 5

Nov 25, 2011   //   by Kristi Hines   //   SEO Blog  //  5 Comments

Have you ever wondered what traffic sources, content, or visitor demographic resulted in the most affiliate sales? Knowing this kind of information is key if you want to increase your earnings as an affiliate marketer. This post will take you through setting up Google Analytics to track your affiliate link clicks.

What You Can Learn from Offsite Event Goals

Because affiliate sales take place off of your site, you have to set up an event goal type in Google Analytics. This will simply track the clicks on your affiliate links. The downside is that Google Analytics will never know if someone actually made the purchase once the visitor has left your site, but you can at least get a good idea of the following:

  • Which traffic sources, content, and visitor demographics generate the most affiliate link clicks.
  • Which affiliate products convert the best with your audience. If you get ten affiliate links clicks in a day that result in one sale for Product A, and ten affiliate link clicks in a day that result in six sales for Product B, then you’ll know that focusing your efforts on Product B is a more lucrative option.
  • Which banner ad on your website (sidebar, header image, footer image, etc.) results in the most affiliate clicks.

So while it may not be 100% accurate, you can still learn a lot from setting up this goal type to track your affiliate clicks. Note that you can only have a total of 20 goals in your Google Analytics – keep in mind that you might want to setup ones for things like mailing list conversions, your own product sales, or other important conversions on your site.

Setting Up an Event Goal in Google Analytics

To use the Event goal type, you must:

  • Have your Google Analytics installed before your tag on your website.
  • Add onClick=”_gaq.push(['_trackEvent', 'Category', 'Action', 'Label']);” to your event.
  • Configure the Goal Details to match your event tracking code.

For example, if you want to track a click on your sidebar banner for Product A, then you would have a link that looked like the following:

You would then enter the following into your Goal Details in Google Analytics under 1. Configure a combination of one or more event conditions from the list below using the following information:

  • Category > that is equal to > Affiliate
  • Action > that is equal to > ProductA
  • Label > that is equal to > Sidebar125

You can also associate a Goal Value to be the average amount of the common sale. If you think that out of every ten clicks, you will get one affiliate sale of Product A, and Product A has an affiliate commission of $100, then your Goal Value would be $10. You can either leave the Goal Value blank or adjust it if you find, at the end of the month, the affiliate commission for Product A doesn’t match up to your Goal value.

Your final goal setup would look like this:

Google Analytics 5 Goal Setup

Reviewing Your Goal Conversions

Once you have set up your event goal, you just need to wait for the data to start coming in, and then you can start reviewing your goal conversions. You can do so from the following areas in Google Analytics:

  • Visitor Demographics: Under Visitors > Demographics, you can view the location visitors to your website come from and how they relate to your goal completions by click on the Goal Set corresponding to your affiliate links under Explorer. If you see that a particular country converts better than another for your affiliate links, you might want to consider refining your advertising efforts (if you use PPC) for that product in that country.
  • Traffic Sources: If you are curious which traffic sources lead to the most goal completions, simply go to Traffic Sources > All Traffic, and click on the Goal Set corresponding to your affiliate links under Explorer. Then you will see a goal conversion rate percentage for each of your individual goals next to your top traffic sources. You can drill down and see this data for referring URLs and keywords that people used to find you in search results under Search > Organic.
  • Events: Under Content > Events, you can see detailed click information for each of the event types you create (the event type is the event category you set up earlier). Once you click on an event type, you can see the number of clicks based on the event actions and event labels. Using the dropdown for Secondary Dimension, you can also see these event details next to traffic sources, visitor demographics (continent, city, state, etc.), and technology (browser type, screen resolution, etc.).
  • Conversions: This is the main area for data related to your goals. Clicking on your Conversiosn > Goals > Overview will show you an overview of all of your goal completions in the last 30 days. You can use the dropdown to narrow the data down to one specific goal. From here, you can see the top goal completion URL’s (or the pages that the goal was completed upon).

Your Method of Tracking Affiliate Sales

How do you find out what banners, links, reviews, and traffic sources convert to the best affiliate sales? Please share your strategies in the comments below!

Similar Posts:

Kristi Hines

Kristi Hines is a freelance writer, professional blogger, and social media enthusiast. Don't miss her Web Domination Review on Kikolani. Follow her on Twitter and Google+!

More Posts - Website

"Newsletter" Our weekly newsletter features some of the best curated SEO content from around the web!



Comment Policy

  • In addition to tracking clicks on aff links, it is also good to know which keywords are bringing sales, especially if PPC is one source of traffic. Keyword with most clicks on aff links doesn’t have to be the one with the most sales. For aff links that allow sub parameters, like CJ, Shareasale and similar, it can be done through simple PHP script that appends referer info to the link. So CJ link on the page that looks like this:
    http://www.jdoqocy.com/click-1234567-12345678?sid=
    If someone types “SEO Guide” into Google, navigates to your site and clicks on the link above, the link turns to:
    http://www.jdoqocy.com/click-1234567-12345678?sid=Google+SEO+Guide

    That way keyword referer info is passed into CJ and you know which keywords are bringing sales, not just clicks.

    • Toni says:

      Thanks for the post Kristi, and the additional thoughts Roko.

      It could also be useful to pass some other parameters so as to be able to tie the sale to other elements perhaps…

  • Hi Kristi,

    You really are doing good job writing and sharing information for everyone. Thanks for this great post!

  • Very useful! Thank´s for this instructions, I´ve set it up like you explained, now waiting to see the first data coming in…

  • Thanks a lot Kristi, I was banging my head against the wall already.
    The configurations in Analytics I knew, but the onClick=”_gaq.push(['_trackEvent', 'Category', 'Action', 'Label']);” isn´t in any place on the Analytics help pages.