Split Testing and Rotating Offers in Tracking202

Since I made the “PPV Landing Page Rotation” post a few days ago, quite a few people had asked me how to go about doing offer rotation as well.

As usual, there’s more than one way to skin a cat. I’m going to show you the “right” way to do this.  By doing it right, we are going to preserve all of Tracking202’s trackyness.  However, doing shit right always takes more time.  So I would be remiss to not point out a slick way to do this….

Quick & Dirty

This technique was posted by Ad Hustler. (There is a reason he’s in my blogroll, good shit!)  His solution to the problem is simple, elegant, and clever.  It leverages the almost useless offer rotation built into Tracking202 and allows us to make it truly useful. And the best part?  It’s easier to do than a Tijuana stripper.

Let’s say, you want to split-test between two “Free Xbox” offers.  One is on Ads4Dough, one is on Neverblue. You simply go into Prosper and create a new Aff Network. Instead of entering the name of network enter a campaign type.  Something like “Free Xbox Rotation”.

Next go to Setup > #3 Add Campaigns.  Select the Affiliate Network you just added.  For Campaign Name, use something descriptive. I used “Xbox 360 – a4d, nb” so I know what the offer is about and what networks I am split testing it on. Make sure you select “Rotate Urls”.  Then enter in the tracking links for the different offers.  For the Payout, you will only have one field.  You can enter the higher payout, or the lower. It doesn’t matter which.

Finish setting up a Simple Landing page as usual. And boom, you’re done.  When the user clicks on the link from your lander, they will be sent to a different offer each time.  Like I said, quick & dirty.  It works and will get the job done.

The downside to this technique is that you will not be able to determine which offer is making you more money by simply looking in Tracking202 alone.  This is because the income for both offers will be lumped together under your ‘fake’ Affiliate Network.  To determine what each offer is truly earning, you’ll need to log into both networks and see what kind of money you’re making.  Furthermore, the lumped together income you see in Tracking202 will be wrong.  If you remember, we were only able to enter one payout.  So your total income is going to be either over or under the real amount you earned.

The ‘Right’ Way

Advanced users, go to the head of the class. Download the offer rotation script. Read the comments, you’ll figure it out.

Everyone else, read on for a step-by-step.

1. Add Affiliate Networks if you have not done so.

Click: Setup > #2 Aff Networks

For this example, I added ‘Network A’ and ‘Network B’.

2. Add the Campaigns (offers) you are going to be rotating.

Click: Setup > #3 Aff Campaigns

For this example, I will be testing 1 offer from Network A and 1 offer from Network B.  I am calling both offers “Xbox 360 Zip”.  Both of these offers have a different pay out.

3. Setup Your Landing Page

Click: Setup > #4 Landing Page Setup

To rotate offers and have them track properly, you must use an ‘Advanced Landing Page’ like so:

4. Get the LP Code

Click: Setup > #5 Get LP Code > Advanced Landing Page

Select the Landing Page you just created from the drop-down.  Select the offers you will be rotating from the drop-downs.  Click ‘Add Another Offer’ as needed.

When you’re done adding offers, click Get Landing Page Codes.

You will see the “Inbound Javascript Landing Page Code”.  This, as usual, gets pasted into your landing page before the </body> tag.

Following the javascript, there will be additional text boxes that contain the “Landing Page: Outbound PHP Redirect Code”.  There will be code for each offer you selected.

We are concerned with the highlighted portion as show here:

5. Prepare your landing page.

Paste the inbound javascript code as usual. When it comes time to hyperlink to the offer, link to “offer.php”.  So your link code will look something like this:

<a href="”offer.php”"> Click Here to Get Your Xbox!</a>

6. Edit the offer.php script.

You now need to paste each of the ‘Outbound PHP Redirect Code’ links that Prosper202 gave you into the offer.php script. Download the offer rotation script here.

For this example, my two links look like this:

$tracking202outbound = 'http://202domain.com/tracking202/redirect/off.php?acip=545&amp;pci='.$_COOKIE['tracking202pci'];
$tracking202outbound = 'http://202domain.com/tracking202/redirect/off.php?acip=858&amp;pci='.$_COOKIE['tracking202pci'];

After you paste the links, you need to make one small but very important change.  Edit the links so they have an open and closed bracket before the equals sign. They should look like this, note the red bits:

$tracking202outbound[] = 'http://202domain.com/tracking202/...(rest stays the same)




Now save the offer.php and count.txt file in the same directory as your landing page.

7. Wrapping up

Inside the directory where you landing page lives, the files should look like this:

[images]
index.html
offer.php
count.txt

Make sure you set the count.txt file to writeable. (Chmod 777).

Now it’s time to test your landing page.  If you go to http://yourdomain.com/xbox/ you should see your landing page.  Each time you click on the ‘Click Here to Get Your Xbox!’ link, you’ll be sent to a different offer.

That’s it, your done.  Note: you can change offer.php to whatever you want. You can change it to “go-xbox.php”.  Just make sure to change the link in your landing page so it points to the new filename.

Always test your links before launching a campaign!

Leave a comment

Leave a Reply to DaveM Cancel reply.

*

*

CommentLuv badge
Cancel reply

41 Comments

  • GreggSugerman

    Fan-fucking-tastic and thank you so much for this…I hope people who find resources like this are grateful for all the knowledge shared.

    This was much easier for me to follow along than I thought it would be. That being said I can’t get it to work. No idea what the issue is so here is what my index.htm and offer.php pages look like:

    Loan LP Offer Rotate Test

    Click Here For Your Loan!

    Not sure if I was supposed to erase a lot of the extra instructions etc on the offer.php page. I tried keeping your whole page as is just replacing with the two test offers I was putting in, then I tried erasing what I thought (?) maybe I was supposed to:

    <?php

    $tracking202outbound[] = 'http://MyProsperDomainEtc.info/tracking202/redirect/off.php?acip=318&pci=&#039;.$_COOKIE['tracking202pci'];
    $tracking202outbound[] = 'http://MyProsperDomainEtc.info/tracking202/redirect/off.php?acip=124&pci=&#039;.$_COOKIE['tracking202pci'];

    $use_count_file = 1;

    if (count($tracking202outbound) = count($tracking202outbound)-1) {
    $link_num = 0;
    } else {
    $link_num = $link_num + 1;
    }

    $fh = @fopen($my_file, ‘w’) or die(“Error! Can’t open $my_file!”);
    @fwrite($fh, $link_num . “\n” )or die(“Error! Can’t write to $my_file!”);
    @fclose($fh);
    header(‘Location: ‘ . $tracking202outbound[$link_num] );

    } else { // this is random number based rotation, no count file is used.

    $link_num = rand(0, count($tracking202outbound)-1 );
    header(‘Location: ‘ . $tracking202outbound[$link_num] );
    }

    ?>

    Where did I screw this up?

  • You don’t need to remove or change anything in the script. What you removed are comments and are there for documentation purposes.

    From what I see it looks good. “Couldn’t get it to work” is vague. What exactly is not working?

    Also: whenever running into issues, it is best to eliminate variables. Try linking the script as-is. If working properly, it will redirect to google, yahoo, and bing. At least you can confirm that part is working. Then move on to replacing with the proper tracking202 links as in the tutorial.

  • Great post I always just do the quick and dirty way but it’s good to know how to do it easily the “right” way whenever I need too.

  • GreggSugerman

    Still having an issue but I know it is with my .html and not your script. Here is how I have it set up for my http://www.1111offers.info test domain:

    Untitled Document


    <script src="http://www.1111tracking.info/tracking202/static/landing.php?lpip=715"type="text/javascript

    Dammit……what am I doing wrong here?

    • Gregg,

      The problem is sloppiness.

      http://htmlhelp.com/tools/validator/
      http://validator.w3.org/

      1. Put your url in there.
      2. Fix errors.

      Even before doing that I can see some obvious stuff. Double quotes around url in “a” tag. Missing quotes before close of “script” tag. You go through a basic html tutorial if you haven’t already. Also get an html editor. Don’t use notepad. You need something that will catch stuff like open tags and highlight it for you in red. This will avoid stuff like this. Dreamweaver is badass. But overkill for this simple stuff. You can go with some good freeware or open source. Ask people for a recommendation on some forums. http://www.nonags.com/nonags/htmledit.html

  • DaveM

    Just tested this and it works like a charm. Offers are rotating, keywords are been passed and prosper tracking is showing the correct data.

    Kudo’s to you.

    Dave

  • GreggSugerman

    Working perfectly now! Script is exactly what I was looking or thanks again!

  • Bobby

    Nice, easy awesome, was doing it the quick and dirty way (well was going to do it that way for the first time) but decided to do it like this, and it’s VERY easy to follow, literally step by step instructions here, thanks ctr tard! Thanks for your help on the ppv playbook forums as well!

    • You’re welcome.

      Thanks for reading and commenting.

  • Michael

    Hey man, been reading through your tutorials and they are great. Maybe I overlooked this but had a quick question regarding multiple offers on the same landing page. I have a landing page with 3 different offers, all with a click here button on each. How do i pass through the URL that the cpv traffic is coming through with a landing page with multiple offers. Is there a token or something to be passed that pulls the url? Thanks.

  • Michael

    Thank you kind gent. Lead impact was the network I was starting out with.

  • kolodekid

    hi ctrtard!

    iv been using your scripts with p202 on ppv for a long time now and they work great! i just wonder if i could use them for other traffic sources (fb/pof/search bing)?

    Im thinking about your LP rotator and Offer rotator scripts. Ideally I would like to use them both at the same time for PoF/fb and bing.

    Do you see any problems with that?

    thanks!

    • Hi glad you’ve gotten some good use out of these scripts. Yes you can totally use these for other traffic sources. The offer rotation script should work fine unmodified. The LP rotation script will need to be modified for a specific traffic source.

      The mod is simple, it’s simply a matter of capturing the keyword being passed from the ad network, then passing it along to P202. It’s actually a great “get your feet wet” mini project if you’re new to PHP.

      • kolodekid

        great & thanks.

        Hopefully I’ll get this working!

  • Compound

    Awesome script. Literally plug & play.
    No more manual rotation for me.

    • Thanks for reading 😉

  • Joshua

    Thank you so much.

    I was seriously pissed about the amount of typing Prosper202 wanted in order to do the tests I wanted to… I knew there had to be a better way, and you’re script provided it.

    Faster to setup, and much faster to edit in the future too.

    Awesome work and walk through.

    Joshua

    • Thanks man, and thanks for commenting!

  • Joshua

    Alright.

    WAY too much typing involved (my main helper just about died), but two dozen landing pages now have rotating offers and keyword/source tracking in place.

    Thank you.

    Before I go and do another couple dozen I have a couple questions I’m sure you’re (in an overqualified state) able to answer.

    Question 1: Is there a sound way to push or pull data from Prosper202 w/o having to use the one-at-a-time web interface?

    I’d love it to just puke the LP codes (the number, not the whole #!&ing link) to a spreadsheet for example broken down by some reasonable metric (like offer).

    Basically, any ideas or tips you have on reducing the level of manual operation required while still having the ‘right-way’ results is what I want to do.

    Question 2: My rotation seems to take a long time… like long enough that you click, see at least a flash of some ‘other’ white page, then it loads up the destination (approx 1 sec total “WTF?” time).

    I currently am using just the random number method in the rotator… I get enough clicks I don’t care about even rotation and since I didn’t want to have to make ‘product1,2,3…txt’ count files for each I just used the random number method. Would I see faster redirection if I used the count file method instead of the random number?

    I have a VPS w/ lots of CPU and RAM headroom, so I don’t think it is a hardware issue. Any ideas?

    Again, your write up was a huge help to improving how we were getting this done. Thank you.

    • You could pull data from Prosper easily, in an automated way, by accessing the MySQL database directly. To do this, you would need to create some custom code, but it would not be very hard. The 202 DB structure is pretty intuitive. Your code could spit out a CSV file just as you wish.

      However, be aware, the LP Code for Advanced Landing Pages DO NOT change. Try it for yourself, pull LP Code for the same Advanced LP, 2 times in a row, and you will see what I mean. You should also note, the Offer Link/Redirect code does not change either. So doing what you wrote above might be overkill. Simply paste the codes as you get them into a text file and you can refer to them later without going through 202.

      As for your rotation, it should not be taking so long, it should be instantaneous. Especially since you are using the random number method– it is faster because there is no disk access.

      I suspect the slowness is from 202 itself (not my rotation code). Why 202 is slow could be a few things. Like, shitty VPS, some problems/issues with the VPS, issues with MySQL, or your 202 is overloaded. Older versions of 202 would slow down after you send a ton of clicks to them, because the database grows very large. I would suggest doing a fresh 202 install or emptying your existing one. Check out the 202 forums for more info on this.

      Thanks for reading and commenting!

  • Joshua

    Thanks. ..heh. I never thought your script was a concern. I asked because you wrote a script and knew/shared so much I figured if something was awry you’d be likely to know where to start looking.

    It’s the cloaking.
    I had cloaking on and it goes slow.
    Cloaking off, it goes fast.
    Cloaking on, it goes slow again.

    Eh. If that means something to you, awesome. I’d love to fix it. If not, I guess I’ll either live with the delay or pull the cloaking.

    Thank you again. Cheers.

  • Nick

    Awesome! Thanks for this.

    Quick question… If I’m just wanting to rotate offers by direct linking, and not using a lander, do I just call the offers.php script directly, or would I still need an index.html file which just re-directs to the offers.php file immediately…?

  • Kevmon

    Thank you for this awesome post! Quick question though: If rotating between 2 offers, can you apply a percentage to the amount of times they’re shown? offer1 show 25% of the time while offer2 shows 75% of the time? Thanks

    • That wouldn’t be too hard to do. Maybe I’ll get around to it one of these days 😉

      Thanks for reading.

  • david
  • http://jrtux.com/click/?s=19246&c=101401&subid=[[subid]]

    [[subid]] is a token, a place-holder that 202 will fill in all by itself.

    Off the top of my head, I don’t remember if Neverblue uses the “subid” variable. So double-check with them.

    Thanks for reading!

  • ackbar22000

    GREAT !!
    Just what I needed
    Thank you for sharing this.

  • Awesome stuff man. Thanx for help. Trying your solution now.

    One thing is I’m rotating landing pages and offers at the same time. How do I set this up correctly?

    Here’s the T202 LP rotator:
    http://prosper.tracking202.com/scripts/split-testing-landing-pages/

    So I set up multiple LP’s the way you suggested. And then add final/rotator LP (lprotator.php) as advanced LP right? Then paste this script above into lprotator.php to rotate all those multiple advanced LP’s I just added. And get a link for lprotator.php URL? Is that the way it should be done?

    Thanx

  • Another issue, when clicking on a link in my LP I’m getting this:

    Fatal error: [] operator not supported for strings in /home/xxx/public_html/domain/dir/offerrotator.php on line 22

    Strange, but it only showed up in firefox, and not chrome or IE. It redirects ok in those…

  • illya Kuryakin

    Hey Mark, Thanks for this. Straight to the point. I have a unique (I think) need to switch offers at certain times of the day. Any pointers on what code to add to check the time before reading what offer to hit?

    Thanks
    Illya

    • Hi Illya,

      You can use the php date() function to do what you want. Keep in mind, this function will return “server time” which might be different then your local time, and different from the traffic source’s time. If you want to make things simpler, you can change your server’s time. Google “linux change timezone” or bug your hosting support to do it for you.

      Thanks for reading!

      • illya Kuryakin

        Thanks!

  • Great post! Long time reader. What does it mean when your redirect page displays this message:

    Warning: Cannot modify header information – headers already sent by (output started at /home/fom/public_html/go/EMO-offer.php:16) in /home/fom/public_html/go/EMO-offer.php on line 33

  • Don’t worry. I figured it out. There was a space in one of my codes. Apparently, if there is a space before of after the PHP call, its common to get this erro.

    Great bolg BTW. Love the hacks!
    Izzy’s latest blog post: FM Commends Julia Tijaja’s Performance In Trade

    • Yup, you got it. When PHP is executing the header function, it is actually modifying the http headers. It’s these headers that tell your browser where to go. So if you have empty space before that function (like outside of the php tags) you will get that error.

      I’m glad you like the blog. Thanks for reading!

  • Jessie

    Hi ctrtard,

    Your script for offer rotation works perfectly – big thanks!

    One thing I`m stuck on is – I also set up LP rotation by using your script, so I get 2 LPs rotated, and 2 offers rotated on each of them. Fordestination URL, I use the suggested http://mydomain.com/xbox/, and it opens and rotates the LPs and the offers perfectly.

    The problem that I see is that on P202 reports, I am only able to see which offer is converting better, but seems that there is no way to see which LP converts better.

    I have also set up LP rotation ONLY for other campaigns, and it does work fine – I can see in the reports which LP has a higher CTR.

    But not when I combine the LP and offer rotation… I am not very technical, but I guess this has something to do with setting the page as “simple” for LP rotation, and as “advanced” for offer rotation.

    Do you have any ideas on what I am doing wrong? Or how I could solve this?

    Thanks again!

    • The 2 scripts work fine together. You probably just made a mistake. Best I can suggest is to get the lp rotation script working first. Then add offer rotation.

  • biggenius

    I am looking for GEO Rotation and Tracking of offers

Trackbacks/Pingbacks

[…] check out these 2 posts: Split Testing and Rotating Offers in Tracking202 | CTRtard.com – Internet Marketing with a Helmet Split Testing and Landing Page Rotation Script for PPV | CTRtard.com – Internet Marketing with a […]

Split Testing and Rotating Offers in Tracking202 [Link] « September 11, 2011

 
 
 

Related posts by category

Related posts by tag