How To Split-Test Landing Pages with Tracking202
This is another one of those topics that keep coming up on forums and in blog comments. Many people know they should split-test, or have heard they can do this with Tracking202 - but they’re unsure how.
Now let it be said that, the form of split-testing we’re after here is pure and simple A/B/C testing. That is, we’re only testing variations of entire pages - not slight variations within a page. To do that, Google’s Website Optimizer is more suitable.
So - there are several ways to split-test landing pages, but the most common (and simplest) way to do it is using a small .php script that will rotate between and redirect to a set of landing pages you specify. Wes Mahler over at Tracking202 wrote up a brief instruction on how to use their landing page split-tester, but some people are having some trouble getting it set up just right. So I figured I could explain it in a bit more detail here.
First, a simple visualization of how this works:
The T202 landing page rotator looks like this:
Note: The script also relies on having a dummy file called count.txt with write-permission located in the same directory on your server. You can create an empty file like this in Notepador your favorite text editor.
Ok, so let’s say we have 3 landing pages that we want to split-test:
We also have the split-testing (rotation) script in the same folder:
So we have:
www.example.com/lander_a.php
www.example.com/lander_b.php
www.example.com/lander_c.php
www.example.com/rotate.php
www.example.com/count.txt
Configuration
- In the rotate.php file, modify the following lines so they match our landing page filenames:
- In Tracking202: Go to Setup - #4 Landing Pages, and add each landing page there with its own name, e.g. “My1stSplit_LP_a†and so forth. Set the landing page URL for each of them to:
www.example.com/rotate.php. Select the appropriate Aff Network and Aff Campaign for this page.
- Also, add a separate landing page for rotate.php and again use www.example.com/rotate.php for its landing page URL. We will call it “My1stSplit_Rotatorâ€.So we have now added 4 landing pages in Tracking202:
3 for the actual landing pages we will test between, and 1 dummy that is really only the rotating script itself. - Now go to Setup - #6 Get LP Code and grab the code for each of the three landing pages. It should look something like this:

Insert this code into the appropriate landing page file (at the bottom right before the </BODY> tag). Make sure to also grab the outbound PHP code for any outgoing affiliate links you have set up for that landing page as well.Note: we do NOT grab the LP Codes for the rotate.php page, as this really is not a landing page. - Now we need to generate the destination link to be used in our ads. Go to Setup -#7 Get Links. Select “My1stSplit_Rotator†and generate the link for it.It should look something like this:

And this is our final destination URL to be used in our source of traffic, be it PPC ad or whatever.
$landingpage[1] = ‘lander_a.php’;
$landingpage[2] = ‘lander_b.php’;
$landingpage[3] = ‘lander_c.php’;
Save the file, and upload it to the server along with the count.txt file. Make sure count.txt has file permissions of 777.
What will happen now is that for every new visitor clicking our ads through our destination link, the next landing page in line will be shown. In Tracking202, the visits will be shown as visits to either:
My1stSplit_LP_a
My1stSplit_LP_b
My1stSplit_LP_c
Tip for Naming Landing Pages in T202
In Tracking202, give each of your landing pages descriptive names that remind yourself of the unique features of that page. By doing this, you can instantly see what landing page style works the best when looking at your statistics.
For example, I give mine names like “blueBG_noOptIn_redHeadline” to tell myself that the page I’m seeing statistics for is the one that has blue background, no opt-in form, and a red headline style.
Now get to tracking and optimizing for more profits!











Comment by Wes (MasterlessSamurai.com) on 9 May 2009:
Very nice descriptive writeup. Yeah, this can be tricky with Prosper202, so a detailed tutorial was definitely in the asking.
Retweeted…!
Comment by Ian Fernando on 30 May 2009:
this is what I actually do now, I use wordpress to help rotate LPs tho - I use LP Jumper to help with this. similar exatly but using wordpress backend
Comment by Thatcher Michelsen - RichAgent.com on 4 June 2009:
Very impressed. Thanks for the fantastic job on this tutorial.
Comment by Adam on 5 June 2009:
Hey,
First of all, thanks for this tutorial as I was actually in need of exactly this recently.
Was wondering if you might be able to help me with something? The script is running and is alternating my landers just fine, the problem is, it’s registering the hits in 202 under the rotate.php rather than the actual landers themselves.
Do you have any idea why this would happen?
BTW, the landers all have the landing page tracking code on them.
Cheers
Comment by brian on 6 June 2009:
Thanks for the detailed explanation. I’ve gotten the rotate script to work with regular php sites, but with Wordpress I’m confused. The rotate script and count.txt are supposed to be in the same directory as the landing pages, but since the landing pages are dynamically generated, which directory do rotate.php and count.txt go in? I put them in /wp-content/my-theme/ and that isn’t working…?
Comment by ImagesAndWords on 6 June 2009:
@Adam; Strange. Are you sure you didn’t grab any landing page code for the rotate-page? (See step 4)
@brian; I would recommend you check out LP Jumper, as mentioned by Ian Fernando above.
Comment by Philip on 1 July 2009:
Sweet!!
I intended to use the rotator a couple months back - but had some
difficulty with the set-up. I was also told that if I was going
to rotate landing pages to not use the one inside of prosper.
I’m on this today!! Very clear, very idiot proof instructions and
diagrams. I guess this means that even I can follow them!
Thanks For Your Blog!!!
Thanks For The Post!!!
Comment by The-money-maker on 9 July 2009:
Great information on testing landing pages. It simply clarifies stuuf for us.
Oh and nevertheless, thanks for the page rotator script. I really needed that.
Comment by Renatas on 29 July 2009:
Hey,
I followed every step by step, however, I am facing errors. I rotate btw two LPS. The 1st one loads with no problems, but when it comes to the 2nd LP the following error comes:
“Warning: include_once(l01.php) [function.include-once]: failed to open stream: No such file or directory in /home/projektu/public_html/abbysdietdiary.com/rotator.php on line 34
Warning: include_once() [function.include]: Failed opening ‘l01.php’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/projektu/public_html/abbysdietdiary.com/rotator.php on line 34″
Can anyone give a tip of what is wrong?
Comment by ImagesAndWords on 31 July 2009:
@Renatas;
I’m sure you have double-checked but, do you have the file “l01.php” actually where it’s supposed to be, with the exact same filename, and all permissions set correctly?
Comment by Thatcher Michelsen - RichAgent.com on 17 September 2009:
I understand how-to and have-been using this setup for direct linking to the offer pages using my cloaked php redirects…
BUT what is the correct setup in order to use iframed offer lander.
I’m not sure how to use the iframed urls for the offer landers… because the php for the cloaked link passes the masked subid to the tail of redirected destination url… which causes the destination url to fail, because it ends up like this http://www.domain.com## (## representing the incremental subid)
Am I missing something?
Is there even a way to do this? Thanks!
Comment by Jon on 31 October 2009:
If I were to put step 5.’s link in place of step 4. (in the steps above) would that suffice for a direct linking rotator?
Comment by David D Ochoa on 2 November 2009:
This is also good to test the same offer from different networks!
Comment by Greg Hyne on 6 November 2009:
Clear instructions, thanks. I want to have my destination URL as my homepage. Any way of doing this without a redirect?
Pingback by How to split test landing pages with Prosper 202 | Unemployed Programs on 19 November 2009:
[...] http://profitapolis.com/featured/how-to-split-test-landing-pages-with-tracking202.html [...]
Comment by Charles on 30 December 2009:
I tried installing the script, but the page with the script info keeps coming up. I believe I loaded it correctly, but can’t seem to get passed this.
What am I doing wrong, Thanks
Comment by Savio on 29 January 2010:
I want to split test LP & DL. What changes would I have to make to the steps ?
Comment by ImagesAndWords on 29 January 2010:
@Savio:
Add the direct link as one of the pages to rotate in “rotate.php”. Think of it as replacing the line lander_c.php with your direct link. Don’t forget to add the direct link into T202 for tracking.
Comment by Glen on 14 March 2010:
Every apostrophe, quotation mark etc. in your post looks garbled (Safari 4, Firefox 3, Opera 10 on MacOS X), e.g. “let’s say…”, no matter what I choose from View -> Text Encoding. Did you paste this in from MS Word or something? You shouldn’t do that, it screws up your text.
Comment by ImagesAndWords on 14 March 2010:
@Glen;
Yeah I’ve been noticing this too lately and I don’t know what’s going on. I did not paste these from Word or anywhere else though, and the funny thing is that the characters were not there when the posts where new. It’s like the character set has become corrupt or something.
And - when I saw your comment in my inbox, that symbol wasn’t there. But now that I’ve approved it and it shows up on this page, it’s whacked. Looking into it..
Comment by kolbarba on 18 March 2010:
thanks mate for step by step instructions! helped me a lot…i was missing one part from Wes tutorial. the dummy rotate lp and “get links” part in prosper. but now it seems logical
cheers!
Comment by Josh Todd on 14 April 2010:
There are so many different opinions on how this should be done, but this is a great guide with straight-forward steps. Right on.
Comment by Cataclysmic on 16 April 2010:
Excellent guide - it has saved me many many hours of frustration. I have everything working properly, except I can’t figure out how to throw a direct link into the rotation. To Savio who asked about it, you wrote:
“Add the direct link as one of the pages to rotate in “rotate.php”. Think of it as replacing the line lander_c.php with your direct link. Don’t forget to add the direct link into T202 for tracking.”
…but if I actually throw in the direct link exactly how I get it from the affiliate network, that’s not going to work because:
A) When using P202 to create the destination link to use for my ads, I had to specify that I’m using a landing page (because I’m using rotator.php). If I tell Prosper that I’m using a landing page, and then I direct link instead, I’m sure something is going to break because for one thing I can’t put the code on the landing page that P202 wants me to put there… because the landing page does not exist.
B) I can’t cloak my LP to the affiliate network because I’m not able to use Prosper’s cloaking feature.
C) My keyword ( {keyword} ) is not going to get tracked properly - the code just doesn’t make sense.
…and if instead of throwing the affiliate network’s link into the rotation, I create a P202 direct link URL (i.e. http://mydomain.com/tracking202/redirect/dl.php?t202id=XXXXX&t202kw=) that’s not going to work either because now TWO P202 links are being used - first one that tells P202 that I’m using an LP, and then one that tells P202 that I’m direct linking. Something HAS to break using that method because it just doesn’t make sense, and if somehow it doesn’t break, then my keyword isn’t going to be passed along properly, because again all the links don’t make sense. I tried this method and I keep getting error messages.
If you could elaborate on how direct linking should be thrown into the rotation I’d REALLY appreciate it!
Comment by bet on 21 April 2010:
I’m a total newbie with this stuff and I’m sure I’m missing something really obvious, but in step 4 of the tutorial when you say “Make sure to also grab the outbound PHP code for any outgoing affiliate links you have set up for that landing page as well.” What am I supposed to then do with this after I “grab” it??
Comment by ImagesAndWords on 1 May 2010:
@bet; What I meant was just to remind to also grab the tracking link for any affiliate links you may have on each landing page.
So normally for one landing page, you’d want to get 1) the tracking link that goes inside the LP code, and 2) the T202 link that you will place onto the page itself for people to click throug (to the offer or whatever). Hope that made sense.
Comment by Vitaly Makarkin on 6 June 2010:
Great tips about rotating. I’m learnt something new for me.
Comment by Stian on 18 July 2010:
Thanks for the great guide.