SUBID tracking from Referral Pages question...

070707

New member
Mar 13, 2008
1,827
21
0
Ma's Basement
(Mind you, I am not programmer)

Anyone know how to track conversions from a variety of referral pages which I have absolutely no access to?

OR...

When people click to my site... A way to pull the referral, and if it includes (.com/mykeyword ---- or -----.com/my2ndkeyword -------or----- .com/myotherkeyword)

and depending on which it is, it gets sent to a certain subid...

I assume this would only take fairly basic PHP???
 


Asian_collar.jpg
Bloodytats.jpg
Selfshotnicepair.jpg
HelloKittyCalendar.jpg
 
Try this:

Code:
// Keywords and subID they correspond to
$subs = array('keyword1' => 'subID1', 'keyword2' => 'subID2');

$keyword = parse_url($_SERVER['HTTP_REFERER'], PHP_URL_PATH);
$keyword = trim($keyword, '/');

header('Location: http://www.yourafflink.com?subid='.$subs[$keyword]);
Keep in mind sometimes the referer doesnt get passed through. Provided you have php warnings off on your server this should work and if the referer isn't passed (or the keyword doesnt exist in the array) they'll still go to the afflink but with no sub id