开发者

Determining whether a user arrived from Google (and the query he used if so)

From within my Rails app, how do I determine whether a user arrived on a given page by clicking a Google (or Bing or Yahoo) search result?

If the user arrived in this fashion, ho开发者_如何学Pythonw do I determine what search terms he used?


Have a look at

referer = @request.env["HTTP_REFERER"]

then, parse the info you're looking for (site, query) from that string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜