Closed juanpayph closed 10 years ago
what makes you think that this shouldn't work?
yes. you can go with this solution.
or you can place it in the specific environment configuration found under:
config/environments/production.rb config/environments/sandbox.rb
as "sandbox" isn't a default rails environment you'd have to create the file first.
In my application.rb can I have this code?
config.middleware.use Rack::GoogleAnalytics, :tracker => 'UA-45xxxxxx-x' if Rails.env.sandbox? config.middleware.use Rack::GoogleAnalytics, :tracker => 'UA-x3xx40xx-1' if Rails.env.production?
I have different tracker for production server and sandboxing. Is this correct?