Detailed track
event guide
The track
event is a versatile method for recording any actions your users take,
along with descriptive properties about those actions. Each track
event is identified by a name,
such as “User Subscribe,” and can be enriched with properties like “billing plan” to provide context.
These events are crucial for understanding user behavior, measuring the effectiveness of features, and optimizing the user experience.
The track
event collects the following fields:
Field | Type | Description | |
---|---|---|---|
name | required | String | The name of the action |
properties | optional | Object | Free-form dictionary of properties of the action |
track
event?There are two ways to collect the track
event:
Edgee collects the track
event automatically each time it receives a Data Layer with a track
event.
Here’s a breakdown of how to structure the Data Layer:
The track
event can be collected manually by calling the edgee.track()
method via the Edgee SDK.
Here’s a breakdown of how to structure a track
call:
In this example, the track
event captures a “color choice” event, detailing the item’s color, category, and label.
Additionally, you can specify the analytics components where this event data should be sent. If the components parameter is not
specified, Edgee will look at data_collection.components
in the Edgee Data Layer. If not defined, the event will be sent to all your components.
The edgee.track()
method expect the following parameters:
field | type | description | |
---|---|---|---|
track_obj | required | object|string | A free-form dictionary object containing properties of the track event. This object has to include the name field, and can include the properties field. If a string is passed, it will be considered as the name field. |
components | optional | object | Specifies which analytics components should receive the event data. This allows for targeted data sending based on your configured components within the Edgee platform. |
The properties
field is designed for capturing any data you wish to collect.
If this field doesn’t contain personally identifiable information (PII), collecting the track
event is
straightforward and secure without requiring user consent. This is because Edgee anonymizes any personal
data before it’s transmitted to the components.
However, if PII is included in the properties
field, obtaining user consent prior to data collection is imperative.
Additionally, your data collection methods must comply with GDPR, CCPA, and any other applicable data protection laws.
track
Events