Class: AbPanel::Mixpanel::Tracker
- Inherits:
-
Mixpanel::Tracker
- Object
- Mixpanel::Tracker
- AbPanel::Mixpanel::Tracker
- Defined in:
- lib/ab_panel/mixpanel.rb
Instance Method Summary collapse
- #ab_panel_options ⇒ Object
- #identify(distinct_id) ⇒ Object
-
#initialize(options = {}) ⇒ Tracker
constructor
A new instance of Tracker.
- #track(event_name, properties) ⇒ Object
Constructor Details
Instance Method Details
#ab_panel_options ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/ab_panel/mixpanel.rb', line 12 def opts = { env: AbPanel.env, persist: true } AbPanel.funnels.each do |funnel| opts["funnel_#{funnel}"] = true end opts end |
#identify(distinct_id) ⇒ Object
31 32 33 34 35 |
# File 'lib/ab_panel/mixpanel.rb', line 31 def identify(distinct_id) return if !should_track? @tracker.append_identify distinct_id end |
#track(event_name, properties) ⇒ Object
25 26 27 28 29 |
# File 'lib/ab_panel/mixpanel.rb', line 25 def track(event_name, properties) return if !should_track? @tracker.append_track event_name, properties end |