Google analytics, Rails 3.1 |
To use google analytics on rails 3.1
Add
group :production do gem 'rack-google_analytics', :require => "rack/google_analytics" end
to your Gemfile
Run
bundle install
Add
if Rails.env == "production"
config.middleware.use("Rack::GoogleAnalytics", :web_property_id => "UA-[yourcodehere]-1")
endto your config/application.rb
Post new comment