Author Topic: Outbound affiliate links and PPC tracking.  (Read 1627 times)


  • Administrator
  • Hero Member
  • *****
  • Posts: 5116
    • View Profile
Outbound affiliate links and PPC tracking.
« on: June 03, 2011, 07:46:47 PM »
I wanted to try my hand at PPC affiliate marketing with sending keywords to an intermediary page which then link out to merchants.  The issue in this situation is tracking which terms are converting and which are losers that need to be cut.  I know that many PPC veterans have worked out how to do this, but its a problem I've never had to overcome before.

So, you send traffic in with an ID string and then you need to dynamically insert an ID string to the affiliate link when the surfer exits.  I also wanted this to work with static pages.  There are probably lots of ways to solve this problem, but doing some searching out there I didn't' find anything specific to do what I needed.

Here is the logic I used:
Send traffic to a page with a query string: <= keyword ID string at the end there

These are static pages, not script generated, so I needed to capture that ID string some how.  I ended up calling a CGI script via an image call.

Example: <img src="/cgi-bin/">

The script displays a one pixel transparent gif, so its essentially invisible.  The query string isn't passed along to the image call, but the data sits in the  HTTP_REFERER and could be parsed out.

When the script then passes on a cookie to the browser with the keyword ID to be retrieved later.  That's about half of it right there, we have a way of capturing and storing the ID string to use as the surfer hopefully exits the site through an affiliate link.

To get the keyword ID into the affiliate link I used a redirect script.  There are lots of ways to display the URL so that one could hide the fact that it is a aff link if you wish, or you could simply carry the original URL through a jump URL if you wish.  In its simplest form the link would look something like this:

You could lob off and store the subid part in the script if you wanted to, as well as store the entire landing page in the script to make the URLs cleaner.  But the essential point of what I'm doing here is pushing the links through a redirect strip. 

In this script I capture the cookie data and push it into the link as the subid variable. 

Example: s/subid=/${1}$theCookie/

That's basically it, with this approach I could send a bunch of long tail keywords to a landing page with affiliate links and find out what of them are actually converting.  It makes optimizing with a landing page nearly as easy as it is with direct linking. 

I am sure others here have been doing something like this for years, but I just wanted to outline the process for those who were curious.  I am sure I could adapt the process to track organic keywords too -- that would be handy for finding out what terms are worth focusing on.