A Rails engine to add Gauges tracking code to Rails apps.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install gauges-rails
Set your Gauges site ID in the
config.gauges.site_id = GAUGES_SITE_ID
Your site ID can be found on the Gauges dashboard under "Tracking Code".
Or, if your template is using Haml:
While Gauges suggests placing this code right before the closing </body>
can add it to the bottom of your
//= require gauges
If you'd only like the tracking code to be included in the production
environment, create a file like
<% require_asset 'gauges' if Rails.env.production? %>
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature).
- Commit your changes (
git commit -am 'Added some feature').
- Push to the branch (
git push origin my-new-feature).
- Create a new Pull Request.
Thanks to Jason Coene for creating the original version of this Gem.
Copyright © 2012 Tyler Hunt. See LICENSE for details.