diaspora/config/initializers/load_analyitics.rb
danielgrippi fe49579ff5 remove google-analytics middleware due to the fact that it doesn't support injection of custom variables before _trackPageView is called (this results in custom vars not getting tracked)
i've submitted an issue to the gem.  hopefully we can put it back in later… for now i've copy and pasted its output into a helper method.
2012-05-01 18:02:25 -07:00

13 lines
524 B
Ruby

# Copyright (c) 2012, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
#hack to allow us to access app config, rather than putting in enviroments/production.rb
if Rails.env == 'production'
Diaspora::Application.configure do
if AppConfig[:piwik_url].present?
config.gem 'rack-piwik', :lib => 'rack/piwik'
config.middleware.use Rack::Piwik, :piwik_url => AppConfig[:piwik_url], :piwik_id => AppConfig[:piwik_id]
end
end
end