Module: Analytical
- Defined in:
- lib/analytical.rb,
lib/analytical/api.rb,
lib/analytical/bot_detector.rb,
lib/analytical/modules/base.rb,
lib/analytical/command_store.rb,
lib/analytical/modules/adroll.rb,
lib/analytical/modules/clicky.rb,
lib/analytical/modules/google.rb,
lib/analytical/modules/adwords.rb,
lib/analytical/modules/console.rb,
lib/analytical/modules/hubspot.rb,
lib/analytical/modules/totango.rb,
lib/analytical/modules/comscore.rb,
lib/analytical/modules/loopfuse.rb,
lib/analytical/modules/mixpanel.rb,
lib/analytical/modules/chartbeat.rb,
lib/analytical/modules/crazy_egg.rb,
lib/analytical/modules/quantcast.rb,
lib/analytical/modules/click_tale.rb,
lib/analytical/modules/optimizely.rb,
lib/analytical/modules/kiss_metrics.rb,
lib/analytical/modules/reinvigorate.rb,
lib/analytical/modules/microsoft_ads.rb,
lib/analytical/modules/performancing.rb,
lib/analytical/session_command_store.rb,
lib/analytical/modules/google_optimizer.rb
Defined Under Namespace
Modules: BotDetector, InstanceMethods, Modules Classes: Api, CommandStore, SessionCommandStore
Instance Method Summary collapse
-
#analytical(options = {}) ⇒ Object
any method placed here will apply to ActionController::Base.
Instance Method Details
#analytical(options = {}) ⇒ Object
any method placed here will apply to ActionController::Base
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/analytical.rb', line 9 def analytical(={}) send :include, InstanceMethods send :include, Analytical::BotDetector helper_method :analytical class_inheritable_accessor :analytical_options self. = .reverse_merge({ :modules=>[], :development_modules=>[:console], :disable_if=>Proc.new { !Rails.env.production? }, }) = {} File.open("#{Rails.root}/config/analytical.yml") do |f| = YAML::load(ERB.new(f.read).result).symbolize_keys .each do |k,v| [k] = v.symbolize_keys end end if File.exists?("#{Rails.root}/config/analytical.yml") self. = self..reverse_merge end |