
Why does this script not send referrer info to my affiliate? I started using this script so I could test with Google Website Optimizer, and since then all my clicks to the merchant have shown up as blank referrers in their backend...... What's wrong here?
PHP:
<?
$v = $_REQUEST['v'];
$s = $_REQUEST['s'];
if($v == '' || $s == ''){
echo '<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0;url=http://www.affiliatesite.com/index.php?affid?12345&campaign-blankvisit"></head><body>';
}else{
# tracking cookie
$url .= '&campaign='.$v . $_COOKIE['gkeyword'];
# get the base aff url
$url = getUrl($s);
$url .= '&campaign='.$ver;
//print html page
echo '<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0;url='.$url.'"></head><body>';
}
function getUrl($site_id){
switch($site_id){
case 'option1':
$url = 'http://www.affiliatesite.com/index.php?affid?12345';
break;
case 'option2':
$url = 'http://www.affiliatesite.com/other.php?affid?12345';
break;
default:
break;
}
return $url;
}
?>
<!-- google website optimizer below -->
</body>
</html>