[英]Can I tell the last website someone visited before my site?
Let's say someone clicks a link for my blog acme.com.假设有人点击了我的博客 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?
我的意思是,我的意思是,我能告诉他们他们是从 Facebook、谷歌还是其他博客点击了这个链接吗?
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.
而且我无权访问 Google Analytics。
You can check the document.referrer
.您可以查看
document.referrer
。 It is meant precisely for this case.它正好适用于这种情况。
标题中的引用,但我会说除此之外没有。
尝试这个:
console.log(document.referrer);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.