This is just going to be a quick post.
PPC advertising is very helpful when optimizing for maximum conversion rates. In SEO, you don’t pay for each visitor, so the focus is generally on trying to get the visitor, but the most importantly you need to maximize sales and conversions.
First split testing script
So, here is the first PHP script for split testing.
Then make at least two different versions of the page you are going to target, and call each page landingpage1.php, landingpage2, etc.
For example (for split testing five landing pages), edit the top of the script to:
$landingpage = 'landingpage1.php';
$landingpage = 'landingpage2.php';
$landingpage = 'landingpage3.php';
$landingpage = 'landingpage4.php';
$landingpage = 'landingpage5.php';
This will automatically show each page an equal amount of times. In this example, all of the pages would each be shown forcefully 20% of the time.
Second split testing script
This script is more efficient from the server’s point of view:
$landingpages = array(
header(‘Location: ‘ . array_rand($landingpages));
The above code just has one downside. All of the above pages may not be shown an equal amount of times. It’s almost equivalent to tossing a coin 100 times. Statistically it should land on “heads” 50 times and “tails” 50 times, but in reality it won’t.
I’d personally pick the first method.