m.edmondson
m.edmondson

Reputation: 30882

How are 'referral links' discovered?

How do services such as Google Analytics discover the website that a user was using prior to them clicking through to your site. These are commonly called referrals.

I'm not talking about affiliate accounts where 'special links' tend to have a URL variable included but instead services that only appear on your site, how can they possibly see where the user came from?

My educated guesses so far include:

Neither of these seem quite correct - so how do they do it?

Upvotes: 1

Views: 538

Answers (1)

Alex Wayne
Alex Wayne

Reputation: 187034

The browser sends along a "Referer" header, which has the url of the link they clicked that triggered the load of a new page.

http://en.wikipedia.org/wiki/HTTP_referrer

It's up to client (in the case the browser) to pass along that proper value. Which means it can't be 100% trusted. In fact some very old school "security" measures involved protecting content unless access through a certain site or page. You could fool this method of security with Referer "spoofing" where you make your browser lie about where it came from by sending different referer headers.

http://en.wikipedia.org/wiki/Referrer_spoofing

Upvotes: 2

Related Questions