so i want to split test 2 landing pages for my PPV campaign... I have been previously using this script to split test with non-ppv campaigns cause I can just manually put in the keywords like so:
[PHP]<?php
if(rand(0,1) == 0) {
header("Location: http://www.YourURL.com/t202id=keyword1");
} else {
header("Location: http://www.YourURL.com//t202id=keyword2");
}
?>[/PHP]
but with ppv i am not sure if the keyword will pass through... is there any way to make it pass through the split test redirect?
I am using leadimpact btw
Yea, you just have to add 1 line that grabs and stores the variable...then pass it into your redirect
[PHP]<?php
$keyword = $_GET['keyword']
if(rand(0,1) == 0) {
header("Location: http://www.YourURL.com/t202id=keyword1-$keyword");
} else {
header("Location: http://www.YourURL.com//t202id=keyword2-$keyword");
}
?>[/PHP]
$keyword = $_GET['keyword'] <----this line grabs the domain out of the URL (ex: hxxp://domain123.com?keyword=abcd.com )
or
[PHP]<?php
$lp1 = "http://www.YourURL.com/t202id=" . $_GET['t202id'];
$lp2 = "http://www.YourURL.com/t202id=" . $_GET['t202id'];
if(rand(0,1) == 0) {
header("Location: $lp1");
} else {
header("Location: $lp2");
}
[/php]
ok so just to make sure I got this right... my link that I submit to leadimpact would be like:
http://mydomain.com?keyword=
and by adding that line of code to the redirect script it would change $keyword to whatever my keyword is that triggered the pop-up. so my redirect code should look like this:
[PHP]<?php
$keyword = $_GET['keyword']
if(rand(0,1) == 0) {
header("Location: http://www.YourURL.com/t202id=$keyword");
} else {
header("Location: http://www.YourURL.com//t202id=$keyword");
}
?>[/PHP]
thanks for both of those scripts!
Get cpv lab... its better and easier to manage 