Detailed user
event guide
user
event is a fundamental aspect of user analytics, enabling consistent tracking and reference across their lifetime.
Whether you’re dealing with registered users or anonymous visitors, the user
event helps you associate meaningful data with each individual.user
event to enrich
your user data for more personalized and insightful analytics.
First of all, you don’t need to fire an user
event for every user action. Instead, you should fire it when
you first learn about a user, and then update the user’s information as it changes (for example, when they update their profile, or when they first register).
user
event using the Edgee SDK or Data Layer, we securely process the user data at the edge and make sure all subsequent events are bound to that user.
Here’s how it works across different platforms:
page
or track
events are seamlessly enriched with the user’s data. As a result, actions can be properly attributed, providing a complete and accurate view of user behavior.
In addition to that, some components support the user event natively, such as Amplitude and Segment.
For these components - in addition to enriching the page
and track
events for them as well - every time you make a user
call, Edgee will send the appropriate event to the component (e.g. identify
for Segment).
user
eventuser
event is particularly useful in scenarios where you collect information about a user without having a definitive userId
, such as:
user
event collects the following fields about the user:
Field | Type | Description |
---|---|---|
user_id | String | A unique identifier for the user, typically from your own user database. |
anonymous_id | String | An alternative identifier used when a user_id is not available, ensuring that user actions can still be collected anonymously. |
properties | Object | Free-form dictionary of properties of the user |
user
event?user
event:
user
event automatically each time it receives a Data Layer with a user
event.
Here’s a breakdown of how to structure the Data Layer:
user
event can be collected manually by calling the edgee.user()
method via the Edgee SDK.
Here’s a breakdown of how to structure an user
call:
data_collection.components
in the Data Layer. If not defined, the event will be sent to all your components.
The edgee.user()
method expect two optionals parameters:
field | type | description | |
---|---|---|---|
user_obj | optional | object|String | A free-form dictionary object containing details of the user event. This object can include all the following optional fields: user_id , anonymoudId , and properties . You can also provide a string that will be used as the user_id 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. |
user
Eventsuser_id
versus anonymous_id
and stick to it.