Module: BG::Common::Analytics::Intercom::Events
- Included in:
- BG::Common::Analytics::Intercom
- Defined in:
- lib/bg/common/analytics/intercom/events.rb
Instance Method Summary collapse
-
#create_event(data) ⇒ Object
Creates an event in Intercom.
Instance Method Details
#create_event(data) ⇒ Object
Creates an event in Intercom
The data param includes the information for the event to register on Intercom. It should have the following attributes:
event_name: String created_at: Timestamp email: String metadata: Object
more info here: doc.intercom.io/api/#submitting-events
25 26 27 28 29 30 31 |
# File 'lib/bg/common/analytics/intercom/events.rb', line 25 def create_event data if BG::Common.active_job? IntercomEventJob.perform_later data else BG::Common::Analytics::Intercom::Client.new.call data end end |