Module: BG::Common::Analytics::Keen::Events
- Included in:
- BG::Common::Analytics::Keen
- Defined in:
- lib/bg/common/analytics/keen/events.rb
Instance Method Summary collapse
-
#create_event(event, data) ⇒ Object
Creates an event in Keen.
Instance Method Details
#create_event(event, data) ⇒ Object
Creates an event in Keen
The data param includes the information for the event to register on Keen. It can be any valid Ruby hash.
more info here: github.com/keenlabs/keen-gem#synchronous-publishing
20 21 22 23 24 25 26 |
# File 'lib/bg/common/analytics/keen/events.rb', line 20 def create_event event, data if BG::Common.active_job? BG::Common::Analytics::KeenEventJob.perform_later event, data else BG::Common::Analytics::Keen::Client.call event, data end end |