5

我想看看我从各种 URL 缩短服务中获得了多少流量,例如

bit.ly

tinyurl.com

但是因为他们使用 301 重定向,所以他们没有出现在我的分析中。

如何找出谁在重定向流量?

或者

更准确地说,我怎样才能在 javascript 中获取不同类型的重定向的推荐 URL?

4

1 回答 1

7

document.referrer

例子:

if (document.referrer && document.referrer != "")
      document.write('Thanks for visiting this site from ' + document.referrer);
于 2010-11-09T07:54:49.627 回答