Class: OursprivacyIngest::Resources::Track
- Inherits:
-
Object
- Object
- OursprivacyIngest::Resources::Track
- Defined in:
- lib/oursprivacy_ingest/resources/track.rb
Instance Method Summary collapse
-
#event(token:, event:, default_properties: nil, distinct_id: nil, email: nil, event_properties: nil, external_id: nil, identity_context: nil, time: nil, user_id: nil, user_properties: nil, request_options: {}) ⇒ OursprivacyIngest::Models::TrackEventResponse
Some parameter documentations has been truncated, see Models::TrackEventParams for more details.
-
#initialize(client:) ⇒ Track
constructor
private
A new instance of Track.
Constructor Details
#initialize(client:) ⇒ Track
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Track.
58 59 60 |
# File 'lib/oursprivacy_ingest/resources/track.rb', line 58 def initialize(client:) @client = client end |
Instance Method Details
#event(token:, event:, default_properties: nil, distinct_id: nil, email: nil, event_properties: nil, external_id: nil, identity_context: nil, time: nil, user_id: nil, user_properties: nil, request_options: {}) ⇒ OursprivacyIngest::Models::TrackEventResponse
Some parameter documentations has been truncated, see Models::TrackEventParams for more details.
Track events from your server. Please include at least one of: userId, externalId, or email. These properties help us associate events with existing users. For all fields, null values unset the property and undefined values do not unset existing properties.
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/oursprivacy_ingest/resources/track.rb', line 43 def event(params) parsed, = OursprivacyIngest::TrackEventParams.dump_request(params) path = @client.base_url_overridden? ? "track" : "https://api.oursprivacy.com/api/v1/track" @client.request( method: :post, path: path, body: parsed, model: OursprivacyIngest::Models::TrackEventResponse, options: ) end |