问题
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