Sha256: 42da7d281cba8cfc0646081b3ae70d06a94b5634080ca91a8402f4be80429329
Contents?: true
Size: 1.41 KB
Versions: 2
Compression:
Stored size: 1.41 KB
Contents
Fast Google Analytics setup for Rails. This gem is mostly intended for small to medium websites with a simple analytics strategy. Installation ============ Add the following to your `Gemfile`: gem 'google-analytics-rails' Then run: bundle install Documentation ============= http://rubydoc.info/github/bgarret/google-analytics-rails Example configurations ====================== Production only --------------- `config/environments/production.rb`: # replace this with your tracker code GA.tracker = "UA-xxxxxx-x" `app/views/layout/application.html.erb`, in the `<head>` tag : <%= analytics_init if Rails.env.production? %> Different accounts for development and production ------------------------------------------------- `config/environments/production.rb`: # replace this with your production tracker code GA.tracker = "UA-xxxxxx-x" `config/environments/development.rb`: # replace this with your development tracker code GA.tracker = "UA-xxxxxx-x" `app/views/layout/application.html.erb`, in the `<head>` tag : <%= analytics_init :local => Rails.env.development? %> License ======= [google-analytics-rails](https://github.com/bgarret.google-analytics-rails) is released under the MIT license: * http://www.opensource.org/licenses/MIT Thanks ====== Many thanks to [the people that took time to submit patches](https://github.com/bgarret/google-analytics-rails/contributors).
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
google-analytics-rails-0.0.3 | README.markdown |
google-analytics-rails-0.0.2 | README.markdown |