RedirTrack: New Open Source Affiliate Referral Tracking Project
Given the interest in a ClickBank tracking script, I thought I'd announce something a little different, a new open source affiliate referral tracking project I call “RedirTrack”. And I'd like your input on it before I start coding.
P.S.: If this posting causes your eyes to glaze over, don't worry, the next posting will be about AdSense, not this icky click-tracking stuff. Just needed to get the ball rolling.
RedirTrack Requirements
Let's start by talking about what we want to see from this software. Here are the initial requirements based on what I'd like to see RedirTrack do:
- Written in PHP for maximum portability across web servers
- Uses a MySQL database for data storage
- Simple installation
- Requires Apache web server with rewrite capabilities (mod_rewrite) enabled (99% of hosting services offer this)
- Generates unique tracking IDs for use with ClickBank and possibly other affiliate programs
- Stores useful information about each referral
- Creates “nice-looking” affiliate links
For example, say I want to promote the Keyword Elite product, which is sold on ClickBank, from an AdWords ad. This is the kind of destination URL I'd like to use in my ads in group “KE1″ of my campaign:
http://www.mysite.com/go/keywordelite?group=KE1&kw={keyword}
When my ad is clicked, AdWords will automatically insert the keyword that triggered the ad into the URL, so if a user was searching for “keyword tool” the actual URL would be:
http://www.mysite.com/go/keywordelite?group=KE1&kw=keyword%20tool
What I want to come out the other end is an HTTP redirection request (see my book Link Cloaking For The Mystified on how redirections work) that looks like this:
http://egiguere.bryxen4.hop.clickbank.net/?TID=9JT5
The TID parameter (the ClickBank tracking ID) is unique for each click. The RedirTrack script stores useful information about the originating click, including for example the values of the “group” and “kw” query parameters but also things like when the click occurred, the referral URL, and what address it came from. Anytime a ClickBank sale occurs, I can take the TID parameter reported to me by ClickBank and pull out the associated information. This will quickly tell me which keywords are making me money. Of course, I'm not limited to using RedirTrack with AdWords, I can use it to track clicks in my HTML pages, and so on.
The script could be enhanced to handle redirecting users to specific landing pages, not just ClickBank hoplinks. We could even have it do different things when a crawler (the AdWords crawler comes to mind!) visits.
RedirTrack Implementation
So I haven't done a single line of coding yet, but this is how I envision it working:
- The script itself is very simple, because we want it to be fast.
- We'll use an auto-increment integer primary key in the main table that stores the click tracking data. That primary key will be transformed into a ClickBank tracking ID using a base 36 conversion routine.
- The “nice URLs” will be handled using RewriteRule directives in the .htaccess file for our “go” (or whatever you want to call it) directory. Again, this keeps the script simple. (I'm thinking the qsappend option to RewriteRule does most of the hard lifting.)
Off the top of my head, I think the .htaccess file for the “go” directory would look something like this:
RewriteEngine on RewriteRule keywordelite redirtrack.php?vendorid=bryxen4 [qsappend,last]
But don't quote me on that, haven't tried it yet.
Alright, there's the plan. I'm making it open source because I don't want to deal with the hassle of creating a commercial product. Plus I think this is pretty simple stuff, anyhow. Any comments or suggestions before we start coding?
Sponsored Link: Learn how to get AdWords clicks for less than one cent using the simple technique
described in AdWords180.
Eric Giguere is the author of Uncommon AdSense and the award-nominated (that just means it lost!) blog Make Easy Money with Google and AdSense.
| Enjoyed this post? Get free updates by mail or by RSS! |