Offer Split Testing Script

Status
Not open for further replies.

xentech

NFLol.
Aug 12, 2008
1,835
24
0
Great Britain
I was thinking of making a simple php script with an interface which would allow me to easily set up new split testing for offers, because making new hardcoded php files is shit, and I was wondering if there was already one available for free anywhere?

Basically I want to name a campaign, specify offer URL's with a {tag} parameter for sub id's and then be given a URL to use, would save so much time and hassle.
 


PHP:
function splitTest()
{
    $pgArr=array();
    $pgArr[]="/lp1.php";
    $pgArr[]="/lp2.php";
    
    $val=0;
    $ip=$_SERVER['REMOTE_ADDR'];
    
    $spl=explode(".",$ip);
    for($i=0; $i<sizeof($spl); $i++)
    {
        $val=intval($spl[$i])+$val;
    }
    $size=sizeof($pgArr);
    $val=$val%$size;
    
    
    $q=$_SERVER["QUERY_STRING"];
    $server=$_SERVER["HTTP_HOST"];
    $url="http://".$server."".$pgArr[$val]."?".$q;
    header("Location: ".$url);
}
It's not the prettiest code, but it makes sure that people only see one version of the LP since which lander they see is decided by their IP. So return visitors(if the array of possible locations hasnt changed) get sent to the same one as last time and don't notice rankings/reviews/whatever changing.
Wouldn't be too hard to modify it to what you want.
 
Yeah, I will post it here. It uses htaccess for login (the split test urls are accessible without password). And it's very quick and easy to use. I stole Adword's synax. It works like this:

Grants4Skanks ** http://afflink1.com
Dollars4Hollars ** http://afflink2.com
....
You can set up as many as you like, meaning links in one split test as well as different split tests. All within a convenient easy to use interface.
 
Status
Not open for further replies.