1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Set Up Quick and Dirty PHP A/B Test

Discussion in 'Hire a Freelancer' started by Laubster, Aug 18, 2014.

Thread Status:
Not open for further replies.
  1. Laubster

    Laubster Senior Member Premium Member

    Joined:
    May 21, 2013
    Messages:
    1,008
    Likes Received:
    377
    Occupation:
    Self employed
    Location:
    I Travel A Lot
    Home Page:
    Hello,

    I need someone to set up a super basic A/B test for me. I have regular shared hosting and two html files I want to display, traffic split 50/50. Please shoot me a PM with your price quote, need this done ASAP.

    Thanks,

    Chris
     
  2. pavan

    pavan Elite Member

    Joined:
    Mar 30, 2008
    Messages:
    1,603
    Likes Received:
    432
    I can do this quick
    Add me up on skype
    PavanIndia
     
  3. shurk

    shurk Junior Member

    Joined:
    Feb 2, 2011
    Messages:
    122
    Likes Received:
    45
    Code:
    <?php
    $pages = array("a.html","b.html");    
    $choice = mt_rand(0,count($pages)-1);    
    $location = $pages[$choice];    
    header("Location: $location");    
    ?>

    Save that as index.php and then rename your pages to a.html and b.html (or change the contents of the $pages array to reflect your actual page names, you can add further pages too if required).

    With minimal work you can also get this to pass simple trackers via get. I even had this selecting the end site landing page id's and passing them through to the CTA links on my A/B tests at one point :)
     
    • Thanks Thanks x 1
  4. royserpa

    royserpa Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 28, 2011
    Messages:
    4,649
    Likes Received:
    3,494
    Gender:
    Male
    Occupation:
    Negative Options aka Rebills!
    Location:
    Royserpa
    Home Page:
    Hey op i can do it for free. Hit me up
     
    • Thanks Thanks x 1
  5. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
  6. Laubster

    Laubster Senior Member Premium Member

    Joined:
    May 21, 2013
    Messages:
    1,008
    Likes Received:
    377
    Occupation:
    Self employed
    Location:
    I Travel A Lot
    Home Page:
    Thanks everyone! My programmer came through for like $2 but I'll save this for future reference.
     
Thread Status:
Not open for further replies.