public
Description: Simple plugin to sniff inbound search terms from popular search engines
Homepage: http://locomotivation.com/2008/07/17/smells-like-a-google-search-easily-grab-inbound-search-terms-in-rails-using-search_sniffer
Clone URL: git://github.com/squeejee/search_sniffer.git
name age message
file MIT-LICENSE Tue Jul 15 12:51:52 -0700 2008 Initial commit [pengwynn]
file README.textile Thu Jul 17 18:39:51 -0700 2008 Updated README.textile, commented lib [pengwynn]
file Rakefile Tue Jul 15 12:51:52 -0700 2008 Initial commit [pengwynn]
file init.rb Thu Jul 17 16:28:58 -0700 2008 Reorganize the plugin so that there is a Referr... [Jason Derrett]
directory lib/ Thu Jul 17 18:35:13 -0700 2008 Updated README.textile, commented lib [pengwynn]
directory tasks/ Tue Jul 15 12:51:52 -0700 2008 Initial commit [pengwynn]
directory test/ Tue Jul 15 12:51:52 -0700 2008 Initial commit [pengwynn]
file uninstall.rb Tue Jul 15 12:51:52 -0700 2008 Initial commit [pengwynn]
README.textile

SearchSniffer

Simple plugin to sniff inbound search terms from popular search engines

Installation

Installation is easy from Github

script/plugin install git://github.com/squeejee/search_sniffer.git

Usage

class ApplicationController < ActionController::Base
before_filter :sniff_referring_search


end

The plugin populates the @referring_search object containing info that can be passed to a keyword highlighter or internal site search engine to pull related content. For an HTTP referer of http://www.google.com/search?q=ruby+on+rails+houston&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a@

@referring_search.search_terms
=> “ruby rails houston”
@referring_search.raw
=> “ruby on rails houston”
@referring_search.engine
=> “google”

Copyright © 2008 Squeejee, released under the MIT license