Module: BG::Common::Analytics::GA::Events
- Included in:
- BG::Common::Analytics::GA
- Defined in:
- lib/bg/common/analytics/google_analytics/events.rb
Instance Method Summary collapse
-
#create_event(data) ⇒ Object
Creates an event in GA.
Instance Method Details
#create_event(data) ⇒ Object
Creates an event in GA
The data param includes the information for the event to register on GA. It should have the following attributes:
category: String action: String label: String value: Integer bounce: Boolean
more info here: support.google.com/analytics/answer/1033068#Anatomy developers.google.com/analytics/devguides/collection/analyticsjs/events
28 29 30 31 32 33 34 |
# File 'lib/bg/common/analytics/google_analytics/events.rb', line 28 def create_event data if BG::Common.active_job? GAEventJob.perform_later data else BG::Common::Analytics::GA::Client.new.call data end end |