rack-track

Added by clocKwize at August 03, 2011 09:09 Star_smallStar_smallStar_smallStar_smallStar_small tracking
GitHub stats:
Magnifier watcher(s)
Arrow_branch fork(s)
Wrench

About

Makes it easy to manage and document tracking pixels on different pages and areas by keeping them all in a central location.

Usage

MyApp::Application.config.middleware.use(Rack::Track) do
  area :confirmation_pages, "/checkout/order_confirmation", "/basket/complete"

  pixel "Generic GA", :on => :all_pages do
    %Q{
      <!-- GOOGLE ANALYTICS --> 
      blah
      <!-- END GOOGLE ANALYTICS --> 
    }
  end

  pixel "Goal GA", :on => :confirmation_pages do
    %Q{
      <!-- GOOGLE ANALYTICS --> 
      blah
      <!-- END GOOGLE ANALYTICS --> 
    }
  end
end
blog comments powered by Disqus