Setting up Motally tracker on Ruby on Rails

  1. Install Motally gem from RubyForge:

    sudo gem install motally

  2. Add the following code snippet to config/environment.rb

    require ‘motally’ Motally::config do |m|

    m.site_key = 'INSERT_SITE_KEY'
    

    end

  3. Insert the following code snippet to the corresponding helper or view of the pages that you want to track

    <% Motally::track(request, session) %>