Cauder
Cauder

Reputation: 2617

Can I tell the last website someone visited before my site?

Let's say someone clicks a link for my blog acme.com.

Is it possible to determine the source that they came from? By source I mean, can I tell whether they clicked on this link from Facebook or Google or another blog?

This is operating under the assumption that they had to enter my site from clicking a link.

I'm also assuming that I don't have any trackers on this user and it is their first time visiting my website. And I don't have access to Google Analytics.

Upvotes: 0

Views: 46

Answers (3)

Aniket Kariya
Aniket Kariya

Reputation: 1980

Try this:

console.log(document.referrer);

Upvotes: 0

pascalpuetz
pascalpuetz

Reputation: 5418

You can check the document.referrer. It is meant precisely for this case.

Upvotes: 1

Seabizkit
Seabizkit

Reputation: 2415

referer in the headers, but i would say other than that no.

Upvotes: 0

Related Questions