Recent Posts

Sponsors
![]() |
A/B Split TestingAdrian Singer, 05-09-2008 |
Once you have some decent traffic hitting your site (minimum of 1,000 unique visitors per day), it's time to switch gears and focus on split testing.
Split testing is the process of comparing different landing pages, offers, prices, headlines etc. to determine what works best with your traffic, yielding the highest conversion rates.
The two primary forms of split testing are -
A/B Split Testing: (simpler) Comparing two or more unique versions of a landing page.
Multivariate Testing: (more advanced) Comparing multiple testing parameters (headline, fonts, colors, image placement etc.) all at the same time, without requiring standalone tests.
-
As part of this tutorial I will walk you through the process of setting up A/B split testing for your website.
Step 1: Rotator Script
The rotator script will divide your traffic equally across two or more landing pages you are looking to test.
Save this script as your index.php file under a new directory (for example: /redirect/index.php) and update the files names to specify where to send your traffic:
// Enter two or more file names and pick SID codes
// to identify each page. The SID code is how you
// will later identify each variation.
$pages = array(
"index_control.php" => "Control",
"index_freeoffer.php" => "FreeOffer",
"index_expensive.php" => "Expensive"
);
// Pick a unique name to identify this test
$sid_testname = "Landing Page";
// DO NOT CHANGE ANYTHING BELOW THIS LINE
// Pick a random number between 1..num_pages
$page_id = rand() % count($pages);
// Set these for easier access
foreach ($pages as $url => $sid) {$page_id--; if ($page_id<0) break;}
// Redirect to chosen page, passing SID code
if (strpos($url,"?")===false) $url .= "?"; else $url .= "&";
Header("Location: $url&sid_testname=".
URLEncode($sid_testname)."&sid=".URLEncode($sid));
Step 2: Store SID code
Once the rotator script redirected the traffic, we have to store the SID code in a cookie. This way, when the conversion event takes place, we can trace back the referring SID.
If your website is powered by SoftwareProjects, login to your account, click on 'Product Manager', then select 'Settings' from the menu on the left and download 'spi_cart.php'. Include that file on every one of your pages and you're all set.
require_once("spi_cart.php");
// Your page content here
If you're not using SoftwareProjects, include the code below on every one of your pages. Be sure to include this code at the top of each page:
// Store SID in a cookie for 90 days
// Replace YOURDOMAIN with your domain name
setcookie("sid",$sid,time()+3600*24*90,"/",".YOURDOMAIN.com");
Step 3: Log conversion event
If your website is powered by SoftwareProjects, you can skip this step.
Otherwise, you have to manually log the conversion event and referring SID code. This log file can later be imported into Microsoft Excel to produce a report showing conversions and sales volume by SID code.
On the thank you page, displayed to customers after they successfully place an order on your website, place this code:
// Open temporary file under the /tmp directory
// called 'conversions.txt'
$file = @fopen("/tmp/conversions.txt","a");
// Log conversion event and referring sid code
// (Be sure to replace AMOUNT with order amount)
@fwrite($file, date("Ymd").",".number_format($AMOUNT,2).
",".$_COOKIE['sid']."rn");
// Close file
@fclose($file);
Step 4: Review A/B Split Test Results
Login to your SoftwareProjects account, click on 'Product Manager' and then select 'By SID code' from the menu on the left.
The report will show you a breakdown of clicks, lead signups, conversions, conversion rate, sales volume, commissions and net profit, all grouped by the SID codes you picked to identify the tests you conducted:

--
In Summary:
A/B split testing is a quick and easy way to optimize your conversion rates, by continually testing different versions of your landing pages, product pricing, headlines etc.
Using SoftwareProjects, all you have to do to implement split-testing, is to copy and paste the rotator script (step 1) and modify the files / SID codes, to split traffic to the appropriate pages.
Everything else is built-in to the SoftwareProjects shopping cart system, so you don't have to worry about storing the SID code and passing it forward upon conversion.
Get your traffic rotator script up and you'll be able to view split test data within a matter of minutes.
Split testing is the process of comparing different landing pages, offers, prices, headlines etc. to determine what works best with your traffic, yielding the highest conversion rates.
The two primary forms of split testing are -
A/B Split Testing: (simpler) Comparing two or more unique versions of a landing page.
Multivariate Testing: (more advanced) Comparing multiple testing parameters (headline, fonts, colors, image placement etc.) all at the same time, without requiring standalone tests.
-
As part of this tutorial I will walk you through the process of setting up A/B split testing for your website.
Step 1: Rotator Script
The rotator script will divide your traffic equally across two or more landing pages you are looking to test.
Save this script as your index.php file under a new directory (for example: /redirect/index.php) and update the files names to specify where to send your traffic:
// Enter two or more file names and pick SID codes
// to identify each page. The SID code is how you
// will later identify each variation.
$pages = array(
"index_control.php" => "Control",
"index_freeoffer.php" => "FreeOffer",
"index_expensive.php" => "Expensive"
);
// Pick a unique name to identify this test
$sid_testname = "Landing Page";
// DO NOT CHANGE ANYTHING BELOW THIS LINE
// Pick a random number between 1..num_pages
$page_id = rand() % count($pages);
// Set these for easier access
foreach ($pages as $url => $sid) {$page_id--; if ($page_id<0) break;}
// Redirect to chosen page, passing SID code
if (strpos($url,"?")===false) $url .= "?"; else $url .= "&";
Header("Location: $url&sid_testname=".
URLEncode($sid_testname)."&sid=".URLEncode($sid));
Step 2: Store SID code
Once the rotator script redirected the traffic, we have to store the SID code in a cookie. This way, when the conversion event takes place, we can trace back the referring SID.
If your website is powered by SoftwareProjects, login to your account, click on 'Product Manager', then select 'Settings' from the menu on the left and download 'spi_cart.php'. Include that file on every one of your pages and you're all set.
require_once("spi_cart.php");
// Your page content here
If you're not using SoftwareProjects, include the code below on every one of your pages. Be sure to include this code at the top of each page:
// Store SID in a cookie for 90 days
// Replace YOURDOMAIN with your domain name
setcookie("sid",$sid,time()+3600*24*90,"/",".YOURDOMAIN.com");
Step 3: Log conversion event
If your website is powered by SoftwareProjects, you can skip this step.
Otherwise, you have to manually log the conversion event and referring SID code. This log file can later be imported into Microsoft Excel to produce a report showing conversions and sales volume by SID code.
On the thank you page, displayed to customers after they successfully place an order on your website, place this code:
// Open temporary file under the /tmp directory
// called 'conversions.txt'
$file = @fopen("/tmp/conversions.txt","a");
// Log conversion event and referring sid code
// (Be sure to replace AMOUNT with order amount)
@fwrite($file, date("Ymd").",".number_format($AMOUNT,2).
",".$_COOKIE['sid']."rn");
// Close file
@fclose($file);
Step 4: Review A/B Split Test Results
Login to your SoftwareProjects account, click on 'Product Manager' and then select 'By SID code' from the menu on the left.
The report will show you a breakdown of clicks, lead signups, conversions, conversion rate, sales volume, commissions and net profit, all grouped by the SID codes you picked to identify the tests you conducted:

--
In Summary:
A/B split testing is a quick and easy way to optimize your conversion rates, by continually testing different versions of your landing pages, product pricing, headlines etc.
Using SoftwareProjects, all you have to do to implement split-testing, is to copy and paste the rotator script (step 1) and modify the files / SID codes, to split traffic to the appropriate pages.
Everything else is built-in to the SoftwareProjects shopping cart system, so you don't have to worry about storing the SID code and passing it forward upon conversion.
Get your traffic rotator script up and you'll be able to view split test data within a matter of minutes.
![]() |
PHP Redirect Tutorial, 05-21-2008 |
can i download this steps?
![]() |
Adrian Singer, 05-21-2008 |
Yes - feel free to download it.
All you have to do is create your own SoftwareProjects account. You can do this under the Signup link.
All you have to do is create your own SoftwareProjects account. You can do this under the Signup link.
![]() |
Kyle Deneen, 06-05-2008 |
Here's an update to the rotator script, that allows using percentages to control traffic distribution.
For example - you can setup your control page to receive 80% of the traffic and split the remaining 20% between two test pages. This way, you limit your exposure and don't sacrifice the money-generating page.
-
// Enter two or more file names and pick SID codes
// to identify each page. The SID code is how you
// will later identify each variation. You can also define a percentage
// for each page. make sure they all add up to 100
$pages = array(
"index_control.php" => array("sid" => "Control", "percentage" => "20"),
"index_freeoffer.php" => array("sid" => "FreeOffer", "percentage" => "20"),
"index_expensive.php" => array("sid" => "Expensive", "percentage" => "60")
);
// Pick a unique name to identify this test
$sid_testname = "Landing Page";
// DO NOT CHANGE ANYTHING BELOW THIS LINE
$total = 0;
// create ranges for the pages to compare with percentage
foreach ($pages as $url => $url_array)
{
foreach ($url_array as $name => $value)
{
// grab percentage from array
if (strcasecmp($name, "percentage")==0)
$page_percentage = $value;
}
// determine min/max range
$min = $total + 1;
$max = $total + $page_percentage;
// set to new array
$url_percentage[$url]['min'] = $min;
$url_percentage[$url]['max'] = $max;
// increment total
$total += $page_percentage;
}
// Pick a random number between 1..100
// this will be compared to the percentages defined above
$percentage = rand(1, 100);
// determine which url we are going with based on random digit 1-100
foreach ($url_percentage as $url => $url_array)
{
// set the min/max range
foreach ($url_array as $name => $value)
{
if (strcasecmp($name, "min")==0)
$page_min = $value;
if (strcasecmp($name, "max")==0)
$page_max = $value;
}
// if the percentage falls inside this range
if ($percentage >= $page_min && $percentage <= $page_max)
break;
}
// set the $sid
$sid = $pages[$url]['sid'];
// Redirect to chosen page, passing SID code
if (strpos($url,"?")===false) $url .= "?"; else $url .= "&";
Header("Location: $url&sid_testname=".
URLEncode($sid_testname)."&sid=".URLEncode($sid));
For example - you can setup your control page to receive 80% of the traffic and split the remaining 20% between two test pages. This way, you limit your exposure and don't sacrifice the money-generating page.
-
// Enter two or more file names and pick SID codes
// to identify each page. The SID code is how you
// will later identify each variation. You can also define a percentage
// for each page. make sure they all add up to 100
$pages = array(
"index_control.php" => array("sid" => "Control", "percentage" => "20"),
"index_freeoffer.php" => array("sid" => "FreeOffer", "percentage" => "20"),
"index_expensive.php" => array("sid" => "Expensive", "percentage" => "60")
);
// Pick a unique name to identify this test
$sid_testname = "Landing Page";
// DO NOT CHANGE ANYTHING BELOW THIS LINE
$total = 0;
// create ranges for the pages to compare with percentage
foreach ($pages as $url => $url_array)
{
foreach ($url_array as $name => $value)
{
// grab percentage from array
if (strcasecmp($name, "percentage")==0)
$page_percentage = $value;
}
// determine min/max range
$min = $total + 1;
$max = $total + $page_percentage;
// set to new array
$url_percentage[$url]['min'] = $min;
$url_percentage[$url]['max'] = $max;
// increment total
$total += $page_percentage;
}
// Pick a random number between 1..100
// this will be compared to the percentages defined above
$percentage = rand(1, 100);
// determine which url we are going with based on random digit 1-100
foreach ($url_percentage as $url => $url_array)
{
// set the min/max range
foreach ($url_array as $name => $value)
{
if (strcasecmp($name, "min")==0)
$page_min = $value;
if (strcasecmp($name, "max")==0)
$page_max = $value;
}
// if the percentage falls inside this range
if ($percentage >= $page_min && $percentage <= $page_max)
break;
}
// set the $sid
$sid = $pages[$url]['sid'];
// Redirect to chosen page, passing SID code
if (strpos($url,"?")===false) $url .= "?"; else $url .= "&";
Header("Location: $url&sid_testname=".
URLEncode($sid_testname)."&sid=".URLEncode($sid));
![]() |
June Jackson, 07-22-2015 |
I orded Reverse hair loss ,on 7-6 -15 for $39.00 I haven't yet received it ,Can you please Check on my order for me
thank you June Jackson. (PS) This was charged to my Master Card.
thank you June Jackson. (PS) This was charged to my Master Card.
![]() |
Jesús Rosales, 10-09-2015 |
No e resibido el producto y no se que aser, nesesito ayuda gracias
|

Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments