Tracking non-direct referrals

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
stubarny1
Forum Newbie
Posts: 5
Joined: Mon Aug 23, 2010 5:39 pm

Tracking non-direct referrals

Post by stubarny1 »

Hello,

I think this is a bit of a tricky one...

If someone posts my product's name "SuperWidget" in a forum discussion and then someone does a google search for "SuperWidget" to get to my site, how can i track which forum (and ideally which thread) the visitor initially started from (i.e. not the search engine url)?

It would be great to know so that I can get a great overview of the communities that are interested in my product.

Thanks for your help,

Stu
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: Tracking non-direct referrals

Post by superdezign »

The only way to know where a user has come from in order to reach your site is the referrer header sent to your server, accessible through PHP's $_SERVER superglobal array. The index is "HTTP_REFERER". If the user's browser does not inform your server of their referrer, then you have no way of knowing where they came from without referral codes or some similar mechanism.
Post Reply