Class: Bot::Analytics
- Inherits:
-
Object
- Object
- Bot::Analytics
- Defined in:
- lib/bot/analytics.rb
Instance Attribute Summary collapse
-
#mixpanel ⇒ Object
Returns the value of attribute mixpanel.
-
#user_key ⇒ Object
Returns the value of attribute user_key.
Instance Method Summary collapse
-
#initialize(user_key, mixpanel = false) ⇒ Analytics
constructor
A new instance of Analytics.
- #track(event, options = {}) ⇒ Object
Constructor Details
#initialize(user_key, mixpanel = false) ⇒ Analytics
Returns a new instance of Analytics.
7 8 9 10 |
# File 'lib/bot/analytics.rb', line 7 def initialize(user_key, mixpanel=false) @mixpanel = mixpanel @user_key = user_key end |
Instance Attribute Details
#mixpanel ⇒ Object
Returns the value of attribute mixpanel.
5 6 7 |
# File 'lib/bot/analytics.rb', line 5 def mixpanel @mixpanel end |
#user_key ⇒ Object
Returns the value of attribute user_key.
5 6 7 |
# File 'lib/bot/analytics.rb', line 5 def user_key @user_key end |
Instance Method Details
#track(event, options = {}) ⇒ Object
12 13 14 |
# File 'lib/bot/analytics.rb', line 12 def track(event, ={}) mixpanel.track(user_key, event, ) if mixpanel end |