better option than http_referer ??

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
I would like to pull stats on where a user clicked a link from.

So far, my only option that I've found is to use http_referer, but that hardly works in chrome and is otherwise unreliable.

For instance, if you use a bit.ly link, they can tell you where the click came from, etc.

How can they be doing anything but using http_referer since there's no url variables being included in the link?
 

BoberFett

Lifer
Oct 9, 1999
37,562
9
81
That's pretty much it. There's no foolproof method, it all depends on the agent and what it provides.
 

mrjminer

Platinum Member
Dec 2, 2005
2,739
16
76
That is the only standardized option I know of (despite it being unreliable and able to be manipulated).

They could be using some sort of ad platform, or some other non-standard header, like X_FORWARDED_FOR or whatever. Also possible the click is intercepted from whatever by JS and adds a referrer.

You could enable the option in whatever browser you are using to see the headers, or use Wireshark.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
> since there's no url variables being included in the link?

Other than the referrer, the URL itself might be unique:

www.foo.com / 1234567890-A.htm = link from AnandTech

www.foo.com / 1234567890-E.htm = link from Endgadget

The server then maps them both to the same page but can track the source.

Edit: there are also cross-site cookies, "super cookies". Wireshark will show all headers which will include any cookies being sent.
 
Last edited: