【问题标题】:Rails: is there a way to tell the source of the request?Rails:有没有办法告诉请求的来源?
【发布时间】:2024-07-25 20:55:01
【问题描述】:

Google 分析告诉我流量的来源是什么(搜索引擎、Facebook 等)。有没有办法从 request 对象或其他方式获取每个请求的信息?如有任何帮助,我将不胜感激。

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-3 http-headers xmlhttprequest request


    【解决方案1】:

    request.referrer 将为您提供 HTTP referrer 值。

    【讨论】: