Smaxor, provided this script to split-test affiliate offers, but I don't know anything about programming, only basic html skills. How does this script work? I tried to copy/paste the top portion to an index.html, and replaced the affiliate links, nothing happened. Changed it to a .php and nothing happened.
Here it is:
If you don’t have simple split testing code here you go. This will just randomly go through your affiliate urls. Then track your offers at your destination for clicks vs. conversions.
<?
$urls = array(
“http://www.affiliateurl1.com”,
“http://www.affiliateurl2.com”,
“http://www.affiliateurl3.com”,
“http://www.affiliateurl4.com”);
$url = $urls[array_rand($urls)];
$destination = “Loation: $url”;
header($destination);
?>
Also if you don’t want to redirect you can just replace that last line with an iframe and remove the destination line.
The iframed version:
<?
$urls = array(
“http://www.affiliateurl1.com”,
“http://www.affiliateurl2.com”,
“http://www.affiliateurl3.com”,
“http://www.affiliateurl4.com”);
$url = $urls[array_rand($urls)];
echo “<meta http-equiv=’refresh’ content=’0; $url’>”;
?>
Here it is:
If you don’t have simple split testing code here you go. This will just randomly go through your affiliate urls. Then track your offers at your destination for clicks vs. conversions.
<?
$urls = array(
“http://www.affiliateurl1.com”,
“http://www.affiliateurl2.com”,
“http://www.affiliateurl3.com”,
“http://www.affiliateurl4.com”);
$url = $urls[array_rand($urls)];
$destination = “Loation: $url”;
header($destination);
?>
Also if you don’t want to redirect you can just replace that last line with an iframe and remove the destination line.
The iframed version:
<?
$urls = array(
“http://www.affiliateurl1.com”,
“http://www.affiliateurl2.com”,
“http://www.affiliateurl3.com”,
“http://www.affiliateurl4.com”);
$url = $urls[array_rand($urls)];
echo “<meta http-equiv=’refresh’ content=’0; $url’>”;
?>