Module: Mixpanel::Helper
- Defined in:
- lib/mixpanel/helper.rb
Defined Under Namespace
Modules: TrackerProperties
Instance Method Summary
collapse
Instance Method Details
#mixpanel ⇒ Object
3
4
5
6
7
8
9
|
# File 'lib/mixpanel/helper.rb', line 3
def mixpanel
config = ::Rails.application.config
Mixpanel::Tracker.new(config.mixpanel.token, config.mixpanel.options.merge(mixpanel_options)).tap do |tracker|
tracker.extend TrackerProperties
tracker.mixpanel_properties = mixpanel_properties
end
end
|
#mixpanel_options ⇒ Object
15
16
17
|
# File 'lib/mixpanel/helper.rb', line 15
def mixpanel_options
{}
end
|
#mixpanel_properties ⇒ Object
11
12
13
|
# File 'lib/mixpanel/helper.rb', line 11
def mixpanel_properties
{}
end
|