Black Hat Forum
Go Back   Black Hat Forum > Making Money > Affiliate Programs

Affiliate Programs Talk about Affiliate programs, advice, questions and opinions. Do NOT spam your affiliate links here!

Search
 
Do NOT buy anything from MASS PM Messages Asking you to buy IMA Products YOU HAVE BEEN WARNED!! (If you have REFUND IMMEDIATELY)
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-2008, 01:15 AM
oldenstylehats's Avatar
Super Moderator
black hat forumsblack hat forumsblack hat forumsblack hat forums
 
Join Date: Apr 2008
Posts: 1,013
Reputation: 34
oldenstylehats is on a distinguished road
Thanks: 587
Thanked 699 Times in 315 Posts
iTrader: (45)
Default Introduction to Affiliate Offer Completion Tracking

Hello BHWers,
After reading another thread on the forum where a question regarding tracking IP addresses after offer completion was posed, I decided to make a post to help explain the basic idea behind affiliate tracking. While we realize that most seasoned affiliates are very aware of the technique we’re going to outline in this post, we hope that our less experienced readers learn something. What you are about to read is one of the most basic ways to really begin analyzing traffic and creating metrics to streamline and optimize your affiliate sales efforts.

Disclaimer
This is not an efficient or elegant way to go about tracking the people who complete your offers. However, if you’re not already currently tracking the leads you’re generating, it is a very simple way to start a process that will help refine your abilities as an affiliate marketer. We’re not going to offer that many code or SQL snippets because we firmly believe that some parts of the game are to be sold, not told. That said, nothing in this article is too complicated for a beginner to figure out.

What You’ll Need
Here are a list of things which you hopefully already have access to, but which are necessary to go forward with the procedure we’re about to discuss

* Shared Hosting (or better)
* PHP4 (or greater)
* MySQL 4 (or better) and the ability to create new DBs
* Text Editor
* FTP client

Getting Started
First off, you’ll want to create a MySQL DB to store and handle the information you’ll begin tracking from here on out. To do that, you’ll probably want to access phpMyAdmin. If you’re unfamiliar with how to use this web application, you should read the manual. You’ll want to create a table and a series of appropriate fields. The number of fields is dependent upon what you want to track. So, for very, very basic tracking you’ll want to create a field to track the user’s subid, the offer ID of the offer the user filled out, the date they filled it out, and their IP address. This is list of fields is very flexible.

Once you’ve created the DB, you’ll want to create a unique ID to begin to track the users that click on your offers. We’ve done this by simply creating a unique identifier with PHP that gets sent by path argument to each URL referrer page like so:

PHP Code:

<?php
function genKey ($length 10)
{
  
$key "";
  
$possible "0123456789bcdfghjkmnpqrstvwxyz"
  
$i 0
 
  while (
$i $length) { 
    
$char substr($possiblemt_rand(0strlen($possible)-1), 1);
    if (!
strstr($key$char)) { 
      
$key .= $char;
      
$i++;
    }
 
  }
return 
$key;
}
?>
You can either put this code into a separate page, include it on your main page, and call the function or just run the entire process on your main page. The output will be a string similar to this: 8g2kbcz0qr

You’ll want to pass this unique identifier onto your referrer pages. You’ll then want to link to your affiliate page with something similar to this:

HTML Code:
<a href="http://www.yoursite.com/offer.php?id=<?php echo $key ?>" target="_blank">Click here to fill out your offer.</a>
Now you’ll want to figure out how your affiliate network handles subids. Subids are independently assigned path arguments that you can create to send very specific information to your affiliate networks which may then be sent back to you via a universal pingback upon offer completion. There is a fantastic list and small primer on subids located at Subids.com.

Once you’ve figured out how to process subids on your respective network, you’ll want to make sure that the unique ID you created earlier gets passed to the affiliate network. In this example, I’ll use Azoogle’s subid system. So, if you’ve setup a link like I specified earlier, this is the code you’d need to have on http://www.yoursite.com/offer.php:

PHP Code:

<?php
$sid 
trim($_GET['id']);
header"Location: http://x.azjmp.com/%OFFERID%sub=".$sid) ;
?>
%OFFERID% is where you’ll want to place the unique offer ID provided for you by affiliate, which, in this example, is Azoogle.

If you want, you can also begin to track how many users that click your offer links actually complete your offers. To do this, you’ll want to create a record and leave the IP address or offer ID fields blank on the referrer page. This way, you can easily discern between records that have and have not completed offers.

Just like most affiliate networks, Azoogle’s universal pingback tool is very easy to setup. How these tools works is that they send a very basic hit with some path argument attached every time someone completes one of your offers. For this example, a very easy pingback URL to use would be:

Code:
http://www.yoursite.com/pingback.php?subid=%%SUB_ID%%&offerid=%%OFFER_ID%%
The %%SUB_ID%% indicates where your SubID will be. Your %%OFFER_ID%% indicates where the unique ID of your offer will be. When a user has completed an offer, http://yoursite.com/pingback.php will receive a “ping” from the affiliate network with all of the information you’ve requested attached via path argument, so you’ll want to be able to read these, right?

The code is very simple:

PHP Code:

<?php
$subid 
trim($_GET['subid']);
$oid trim($_GET['offerid']);
 
list(
$affid$sid) = explode("-"$subid);
?>
This will grab each respective argument and store it into a variable. The reason for the explode() is that Azoogle returns each subid with your affiliate ID separated by a dash and then whatever subid you define. So, if you defined 8g2kbcz0qr as the subid and your affiliate ID is 12345 then the resultant argument would be: ?subid=12345-8g2kbcz0qr

Now, since you know that any ping to this page is the result of either a test of yours or an actual completion, you can easily begin to add information like the time and IP address to your database. This can be done by simply assigning the IP address to a variable with the following command:

PHP Code:

$ip=$_SERVER['REMOTE_ADDR']; 

Once you have the IP address assigned to a variable, adding it to your DB is very simple.

Hopefully everyone who has read this article and was previously unfamiliar with the basics of affiliate tracking now has a better idea of how to go about doing it. As I stated in the beginning, this is by no means the most elegant or efficient way to go about tracking, it’s just a very basic method that works in a pinch.

I've also posted this article on my blog here.
__________________
Forum Generator - The Automated Forum Solution - Is Alive!
Do you have a black hat SEO question you'd like answered? Ask us on Twitter!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 15 Users Say Thank You to oldenstylehats For This Useful Post:
★WiM★ (11-19-2008), Bastian (12-05-2008), boomboomer (07-08-2008), charles (10-20-2008), chezzie (07-08-2008), Chris Devon (10-30-2008), foxler (10-15-2008), Genjutsu (07-08-2008), h1dd3n (11-06-2008), jammie (10-29-2008), lildog (10-15-2008), unknown_zero (07-10-2008), wealthy199 (07-18-2008), WhiskerBiscuit (07-08-2008), ximscreamingx (07-08-2008)

Make Money!

  #2 (permalink)  
Old 07-08-2008, 01:19 AM
Genjutsu's Avatar
Executive PIMP
 
Join Date: Mar 2008
Posts: 1,063
Reputation: 30
Genjutsu is on a distinguished road
Thanks: 146
Thanked 553 Times in 213 Posts
iTrader: (1)
Default Re: Introduction to Affiliate Offer Completion Tracking

Very good post, i think this might go well above alot of our readerships heads, but thats ok. They can always refer back to it when they need it or become more familiar with the concepts of php/mysql/server_vars.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-08-2008, 01:26 AM
ximscreamingx's Avatar
.Black Hat Millionaire.
 
Join Date: Jan 2008
Location: Next to Missy Elliot
Posts: 920
Reputation: 18
ximscreamingx is on a distinguished road
Thanks: 156
Thanked 346 Times in 160 Posts
iTrader: (0)
Send a message via AIM to ximscreamingx
Default Re: Introduction to Affiliate Offer Completion Tracking

Fantastic post Olden
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-08-2008, 01:34 AM
WhiskerBiscuit's Avatar
Super Moderator
black hat forumsblack hat forumsblack hat forumsblack hat forums
 
Join Date: Dec 2007
Posts: 643
Reputation: 21
WhiskerBiscuit is on a distinguished road
Thanks: 149
Thanked 348 Times in 161 Posts
iTrader: (0)
Default Re: Introduction to Affiliate Offer Completion Tracking

Indeed, very useful information here for a wide range of applications.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-08-2008, 02:03 AM
oldenstylehats's Avatar
Super Moderator
black hat forumsblack hat forumsblack hat forumsblack hat forums
 
Join Date: Apr 2008
Posts: 1,013
Reputation: 34
oldenstylehats is on a distinguished road
Thanks: 587
Thanked 699 Times in 315 Posts
iTrader: (45)
Default Re: Introduction to Affiliate Offer Completion Tracking

Quote:
Originally Posted by Genjutsu View Post
Very good post, i think this might go well above alot of our readerships heads, but thats ok. They can always refer back to it when they need it or become more familiar with the concepts of php/mysql/server_vars.
Indeed.

If anyone has any questions, post them here and we will try and help you figure them out. The idea is to help you understand how the underlying process works just as much as it is to get the results the process provides.
__________________
Forum Generator - The Automated Forum Solution - Is Alive!
Do you have a black hat SEO question you'd like answered? Ask us on Twitter!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 07-10-2008, 05:48 PM
unknown_zero's Avatar
Junior Member
 
Join Date: May 2008
Location: Jakarta, INA
Posts: 122
Reputation: 13
unknown_zero is on a distinguished road
Thanks: 83
Thanked 143 Times in 19 Posts
iTrader: (2)
Default Re: Introduction to Affiliate Offer Completion Tracking

thanks olden, you are a real gem in this forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-13-2008, 11:18 PM
MrNoob's Avatar
Jr. VIP
 
Join Date: Mar 2008
Location: Southern California
Posts: 98
Reputation: 10
MrNoob is on a distinguished road
Thanks: 100
Thanked 78 Times in 23 Posts
iTrader: (1)
Default Re: Introduction to Affiliate Offer Completion Tracking

Thanks olden for the post but I am afraid Genjutsu is correct in his statement that
it is a little above a lot of people. For us noobs that just recently realized that PHP doesn't
stand for "Pee Here People" might there be a software for purchase that would be recommended?
Because it'll a long time for this noob to figure out how to do what you just
wrote. I understand I need to work at understanding these things but I would like to be making the cash while I'm working to understand. But I really appreciate the sharing of knowledge and hope to be worthy of it some day.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-15-2008, 08:54 PM
Loak's Avatar
Jr. VIP
 
Join Date: Apr 2008
Posts: 212
Reputation: 10
Loak is on a distinguished road
Thanks: 29
Thanked 12 Times in 12 Posts
iTrader: (0)
Default Re: Introduction to Affiliate Offer Completion Tracking

brilliant stuff. thanks, this forums got some good chit.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-31-2008, 09:07 AM
grafx77's Avatar
Registered Member
 
Join Date: Mar 2007
Posts: 85
Reputation: 11
grafx77 is on a distinguished road
Thanks: 10
Thanked 10 Times in 4 Posts
iTrader: (0)
Default Re: Introduction to Affiliate Offer Completion Tracking

Quote:
Originally Posted by MrNoob View Post
Thanks olden for the post but I am afraid Genjutsu is correct in his statement that
it is a little above a lot of people. For us noobs that just recently realized that PHP doesn't
stand for "Pee Here People" might there be a software for purchase that would be recommended?
Because it'll a long time for this noob to figure out how to do what you just
wrote. I understand I need to work at understanding these things but I would like to be making the cash while I'm working to understand. But I really appreciate the sharing of knowledge and hope to be worthy of it some day.
Yes Mr Noob....there is. It's called Xtreme Conversions. Google it and you will find that this program is very complex and will solve all your tracking issues.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump






Sitemap: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65