Rails: is there a way to tell the source of the request?

半腔热情 提交于 2020-03-16 05:20:28

问题


Google analytics tells me what the source of my traffic is (search engines, facebook etc). Is there a way to get this information for each request from the request object or otherwise? I'd appreciate any help.


回答1:


request.referrer will give you the HTTP referrer value.



来源:https://stackoverflow.com/questions/6366935/rails-is-there-a-way-to-tell-the-source-of-the-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!