Forum Moderators: coopster
what I would prefer is for a session id ONLY to be set if the referrer is "overture" and, otherwise, for there to be NO session id at all:
<?
session_start();
if(!$_SESSION['overture']){
$_SESSION['overture'] = $HTTP_GET_VARS['referrer'];
}
function showlink($url)
{
global $_SESSION;
if ($_SESSION['overture'] =="overture")
{
$url = str_replace("affiliate-id-1","affiliate-id-2",$url);
}
echo $url;
}
?>
If you simply restrict sessions to users with cookies enabled, or you don't start a session if the user agent is the googlebot, you would be okay.
This thread might help you some
[webmasterworld.com...]
if ($HTTP_GET_VARS['referrer'] == 'overture') {
// add on your session id
}
then a session id won't be set if any search engine spider comes along...so there won't be any problems? If I use that above code, only "overture" referrals will get tagged with session ID's, no?
or is there something I am missing?