Split Testing.

Status
Not open for further replies.

turbolapp

New member
Aug 10, 2007
8,500
187
0
I haven't really been doing any good split testing yet. I want to randomly send traffic to Affiliate Network A or Affiliate Network B. How do I go about doing that?
 


SubID's for one. I really didn't measure which links were converting, etc., and I should have.

Also make sure you have analytics engines/logfile analyzers on any domain you wish to compare.

I like to follow the click-flow of users to find out what they're doing, then tweak/split test the click's/pages they're following most.
 
Thanks bb. I was thinking more along the lines of the same domain randomly sending traffic to 2 different networks...What should I do for code? Something like this? :


<?php
if(rand(0,1) == 0) {
header("Location: http://www.affiliatenetworkA");
} else {
header("Location: http://www.affiliatenetworkB");
}
?>
 
Thanks bb. I was thinking more along the lines of the same domain randomly sending traffic to 2 different networks...What should I do for code? Something like this? :


<?php
if(rand(0,1) == 0) {
header("Location: http://www.affiliatenetworkA");
} else {
header("Location: http://www.affiliatenetworkB");
}
?>

That's thinking outside the box!

Shouldn't really matter to be honest the way you're doing it, however I'd add an internal counter to the script to balance the views. It's possible for the rand to tilt the views (45:55, etc.) and that may throw off your judgment. If I were doing that, I'd want to keep the split as close to 1:1 as I could. I'd use a DB.

if (RS.SplitCount) = 1
redirect to affNetA
set RS.SplitCount = 0
else
redirect to affNetB
Set RS.Splitcount = 1

That way you're only ever off by 1 visit, and mostly equal. (That was an on the fly example, forgive any logic errors)

Are you driving traffic PPC or organic or what? Way to think outside the box!
 
I feel like coding..


$var1 = 'http://www.site.com';
$var2 = 'http://www.site.com';
$input = array($var1, $var2);
$rand_keys = array_rand($input);
$randurl = $input[$rand_keys];

For meta use..
<meta http-equiv="refresh" content="1;URL=<?php echo "$randurl"; ?>" />
 
Thanks, Will. I tried your code but it just kept looping my page (I'm sure it's something I'm doing, although I don't know what)

@Tob I'm not sure how google optimizer will help in this instance. I'm not trying to split test landing pages to see which one users prefer...I'm trying to split traffic to two different affiliate networks to test their tracking. Of course there could be a way to do this with optimizer that I'm just not seeing.
 
Code:
<?php
$mylinks = array("link1.com", "link2.com");

$myrandomlink = $mylinks[mt_rand(0, count($mylinks) -1)];

print ("<meta http-equiv=\"refresh\" content=\"1;URL=$myrandomlink\" />");

?>
 
If you're able to get your Google conversion pixel placed on the confirmation pages of the offer in both networks, just run two separate ads in Google, and create separate landing pages (same page, just change the destination link). That way, you won't have to bother matching up sub-ids, and can just eyeball the conversion stats within AdWords.
 
Yeah, either do what johu suggests, or (with the conver. pixel) with optimizer split test a link.. one that goes to network A and one that goes to network B.. and of course you'll find NBA always wins ;)
 
Heh, your code is dead on. It is generally plenty even, so you really don't need to go to the extreme that bb_wolfe did with the counter. Only thing I'd change is use the meta redirect instead of the header redirect. The header redirect will generally pass on the referrer of the original traffic source (not your redirection page url), not something I generally want to do. I usually combine a meta redirect with a javascript redirect as well, just in case one or the other is disabled. The header redirects are faster however, and could be used if you don't mind passing on your traffic source in the referrer.

Code:
<?php
if(rand(0,1) == 0) {
	$link = 'http://www.neverblueads.com/afflink';
} else {
	$link = 'http://www.copeac.com/afflink';
}
?>
<script language="javascript">
	window.location='<?=$link?>';
</script>
<meta http-equiv="refresh" content="0;url=<?=$link?>">
Also, bigwill's code the meta redirect will wait 1 second before redirecting, no point in that.
 
Also, wtf is with everybody's complicated ass random array selection...
Code:
$ary = array('link1','link2');
shuffle($ary);
echo $ary[0];
is so much easier.
 
If you're able to get your Google conversion pixel placed on the confirmation pages of the offer in both networks, just run two separate ads in Google, and create separate landing pages (same page, just change the destination link). That way, you won't have to bother matching up sub-ids, and can just eyeball the conversion stats within AdWords.
Forgot to mention that you can also just use the conversion pixel in conjunction with the link rotator.
 
This topic brings up another point. You should consider having backup aff networks for the same offer. The main reason is for backup. Ping away and if ping fails, it changes the traffic to move to network #2. This is especially important if your traffic is expensive.
 
Easy Mode Redirect Split Tester | NickyCakes.com

Code:
<?php
  //just add urls to this array and they will be thrown into the mix
  $urls = array (
    "http://nbjmp.com/click/?s=12413&c=50881", //beach bum
    "http://nbjmp.com/click/?s=12413&c=47156", //SEO Supervisor
    "http://www.nickycakes.com/links/neverblue" //neverblue
  );

  $redirect = $urls[rand(0,count($urls)-1)];
  Header( “Location: ” . $redirect );
?>
 
Honestly why would you need google optimizer. split the traffic up randomly. Then login to the accounts and calc your EPC. It's really that simple. Don't over complicate things. I vote for Kyles code as it's clean but replace the with a meta refresh for referer issues.
 
Status
Not open for further replies.