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.
61 62 63 |
# File 'lib/oursprivacy_ingest/resources/track.rb', line 61 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 top-level visitor properties: null clears the existing value, while undefined, omitted fields, and empty strings are ignored. For entries inside custom_properties: null, undefined, and empty strings are all ignored (custom_properties use merge semantics). See docs.oursprivacy.com/docs/data-types for details and common pitfalls.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oursprivacy_ingest/resources/track.rb', line 46 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 |