Prosper202 Tracking202 Export202 WorldProxy202 Meetup202 | Blog Forum Newsletter Twitter | Advertise
Login · Register
Home About Docs Scripts Blog Forums Hosting Donate Download

Rotating Offers

There is several ways to rotate offers with Tracking202, but we will show you the simplest form of doing it.

All we are going to do is either add or edit a campaign, and instead of having the campaign affiliate URL be the normal affiliate URL, we will change to point towards a .php page on your site. For instance, set the affiliate URL now to mydomain.com/rotate.php?subid=, so now when traffic goes through your T202 setup, the visitor will be redirected to rotate.php; which will then redirect the visitor to the offer. Rotate.php will rotate between the offers that the users are redirected to.

It is important that when entering your URL into Tracking202, you should put ?subid= at the end of it, for instance: mydomain.com/rotate.php?subid= is what should be entered into T202, because remember, T202 adds a subid at the of the outbound affiliate url. On rotate.php we are going to grab the subid variable and attach it to the outbound rotated redirect links. Here is the code you would put on rotate.php below:

Rotate.php PHP Code

<?

//Tracking202 Offer Rotation Script

//enter your affiliate urls below, you can enter as many as you want, please
//make sure that you have the affiliate url with the SUBID syntax at the end
//of it, for reference goto: subids.com for more information.
$offer[1] = 'http://myaffiliateurl.com?subid=';
$offer[2] = 'http://myaffiliateurl2.com?subid=';
$offer[3] = 'http://myaffiliateurl3.com?subid=';

//this is the text file, which will be stored in the same directory as this file, 
//count.txt needs to be CHMOD to 777, full privlledges, to read and write to it.
$myFile "count.txt";

//open the txt file
$fh = @fopen($myFile'r');
$offerNumber = @fread($fh5);
@
fclose($fh);

//see which landing page is next in line to be shown.
if ($offerNumber >= count($offer)) {
    
$offerNumber 1;
} else {
    
$offerNumber $offerNumber 1;
}

//write to the txt file.
$fh fopen($myFile'w') or die("can't open file");
$stringData $offerNumber "\n";
fwrite($fh$stringData);
fclose($fh);

//grab the subid that t202 adds
$subid $_GET['subid'];

//redirect to the affilate url, + add the subid at the end
header('location: ' .$offer[$offerNumber] . $subid); 

?>

Conclusion

Now T202 will redirect to mydomain.com/rotate.php?subid= and then rotate.php will grab the subid, and then redirect to the new affiliate urls; and this script of course rotates between as many affiliate urls you want to add to it. Also if you load mydomain.com/rotate.php in your browser, it should redirect you accordingly.

Tracking202 Warning: although this script works, it does have one down-fall. Tracking202 will not be able to determine the different offers, in that when you add/edit the campaign into tracking202 to goto your .php rotating script, tracking202 thinks its just redirecting to one offer, it won't be able to understand all the different offers which are being redirected to and analyze them in the reports. However, the script does work, and it should be used to temporarily find the best offer of the two and then switch back to one offer in the future after you have determined what works best!

Responses

  1. Ron Berg on Sep 03, 2008 at 4:43pm

    How does this differ from split testing LPs?

    Thanks,

    Ron

  2. Steven on Sep 03, 2008 at 5:27pm

    Hi Ron,

    Split testing LPs rotate through different LPs and tell you which one performs better. In this case, you're split testing the offers themselves. So lets say you have the same exact offer with the same exact offer page on more than one network, you can split test the offer to see which network converts better as oppose to assume that every network converts at the same rate. Hope that helps.

Leave a Reply

Name (required)

Email (will not be published) (required)

Website

What does 4 + 4 equal? (required spam filter)


Creative Commons License This work (Prosper202, Tracking202 and Export202) is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.