Skip to content

bemurphy/clicktale

 
 

Repository files navigation

clicktale

Summary

This gem allows easys integration with Clicktale service (clicktale.com) Clicktale records user sessions, clicks, form input etc and plays them back later for usability review.

Installation

  • install the plugin

    ./script/plugin install git://github.com/bemurphy/clicktale.git
  • Run the generator to install clicktale. You have the choice of serving clicktales from rack middleware (clicktale_using_middleware), or an in app rails controller (clicktale_using_controller).

  • If you opted to use rack middleware, make sure to configure it after you memory store is configured, and pass it in as the cache store. The middleware sends all urls for “/clicktales/:id” to the middleware, serving the content from cache.

    config.middleware.use "ClicktaleFromCache", config.cache_store
    
  • head to clicktale.net and signup for a free account. Or not free. Your choice.

  • get a tracking code from clicktale. It should look something like this:

    <!-- ClickTale Bottom part -->
    <div id="ClickTaleDiv" style="display: none;"></div>
    <script src="http://s.clicktale.net/WRb.js" type="text/javascript"></script>
    <script type="text/javascript">
    if(typeof ClickTale=='function') ClickTale(<project_id>,<ratio>,<param>);
    </script>
    <!-- ClickTale end of Bottom part -->
  • replace <project_id>, <ratio> and <param> in the autogenerated config/clicktale.yml with values from clicktale tracking code.

  • Include the Clicktale::Controller in the controller(s) you want to track using clicktale on

  • add partials into layout inside the ‘body’ tag

    <body>
    <%= clicktale_top %>
     ...
    <%= yield %>
     ...
    <%= clicktale_bottom %>
    </body>

Note: The plugin works by leveraging rails caching mechanism, which is by default only enabled in production environment. To enable the plugin in the development environment do the following:

set enabled=true in config/clicktale.yml (development section)
set config.action_controller.perform_caching=true in config/environments/development.rb

Another Note: As of this writing, clicktale service ignores existance of Safari browser. I hope it will someday.

Copyright © 2009 Michael Mazyar. See LICENSE for details.

Releases

No releases published

Packages

 
 
 

Languages

  • Ruby 65.9%
  • JavaScript 34.1%