Ruby gem to track search engines redirection traffic (search keyworks)
Most of the traffic from my site is sent by search engines. I am trying to track the keywords used on the search (EG to have real-time stats on the 'hottest' searches).
What are my options? I thought of:
Parsing the HTTP_REFERER (using a list regexps for major search engines)
Importing google analytics data (using google analytics 开发者_开发问答api) - however this is not realtime
Are there any gems/libraries that offer support for this?
I would write a middleware for rack to do this. http://www.hokstad.com/slidingstats is an example of one that tracks referrers. It is pretty easy to hack and not complicated so you can probably use this as a launchpad for what you want to do.
精彩评论