Module: Mongolytics::Tracker::ClassMethods

Defined in:
lib/mongolytics/tracker.rb

Instance Method Summary collapse

Instance Method Details

#track_all_statsObject



22
23
24
# File 'lib/mongolytics/tracker.rb', line 22

def track_all_stats
  after_filter :track_stat
end

#track_change_statsObject



30
31
32
# File 'lib/mongolytics/tracker.rb', line 30

def track_change_stats
  track_stats_for :create, :update, :destroy
end

#track_params_key(key, type = String) ⇒ Object



38
39
40
# File 'lib/mongolytics/tracker.rb', line 38

def track_params_key(key, type = String)
  Param.key(key, type)
end

#track_session_key(key, type = String) ⇒ Object



34
35
36
# File 'lib/mongolytics/tracker.rb', line 34

def track_session_key(key, type = String)
  Session.key(key, type)
end

#track_stats_for(*actions) ⇒ Object



18
19
20
# File 'lib/mongolytics/tracker.rb', line 18

def track_stats_for(*actions)
  after_filter :track_stat, :only => actions
end

#track_view_statsObject



26
27
28
# File 'lib/mongolytics/tracker.rb', line 26

def track_view_stats
  track_stats_for :index, :show
end