lib/spotlight/engine.rb in blacklight-spotlight-3.2.0 vs lib/spotlight/engine.rb in blacklight-spotlight-3.3.0
- old
+ new
@@ -177,10 +177,12 @@
# To present curators with analytics reports on the exhibit dashboard, you need to configure
# an Analytics provider. Google Analytics support is provided out-of-the-box.
config.analytics_provider = nil
initializer 'analytics.initialize' do
- Spotlight::Engine.config.analytics_provider = Spotlight::Analytics::Ga
+ ActiveSupport::Reloader.to_prepare do
+ Spotlight::Engine.config.analytics_provider = Spotlight::Analytics::Ga
+ end
end
# If you use Google Analytics, you need to wire your site to report to a Google Analytics property.
# Adding Google Analytics to your site is left as an excersize for the implementor (you could
# consider overriding the layout to inject GA code..)