Module: Talis::Analytics
- Defined in:
- lib/talis/analytics.rb,
lib/talis/analytics/event.rb
Overview
Use this as a mixin within your classes to be able to send analytics events.
Defined Under Namespace
Classes: Event
Instance Method Summary collapse
-
#send_analytics_event(event, request_id: nil) ⇒ Object
Create a single analytics event.
Instance Method Details
#send_analytics_event(event, request_id: nil) ⇒ Object
Create a single analytics event. In order to send events, the client must be configured with a valid OAuth client that is allowed to search for users:
Talis::Authentication.client_id = 'client_id'
Talis::Authentication.client_secret = 'client_secret'
27 28 29 |
# File 'lib/talis/analytics.rb', line 27 def send_analytics_event(event, request_id: nil) Event.create(request_id: request_id, event: event) end |