首页 > 解决方案 > Javascript 代码是否通过引荐流量

问题描述

我有一个网站website-A.com ,我在其中添加了另一个网站website-B.com的 Javascript 代码:

<script type="text/javascript" src="website-B.com/js/file.js"></script>

我的问题是:网站-B.com通过这个 JS 代码可以看到我网站的REFERRER流量吗?

即电子邮件营销> 客户点击链接> 他们转到我的网站website-A.com,其中包含源代码中的 JS 代码;website-B.com可以看到流量来自电子邮件营销吗?

太感谢了!

标签: javascript

解决方案


You can use document.refferrer if it's coming from another page or site, but I don't think that works for email...usually you set the link (in the email) with a query params that can be tracked once it hits the target site/page

ie: www.your-site.com?source=email as the link in the email, when the page loads on your site you check the url for the query params and do whatever you need to do as far as tracking


推荐阅读