IDENTITY events
The IDENTITY event is used to resolve the identity of an anonymous site visitor (guestguest) of your app. When Sitecore receives an IDENTITY event, typically captured in registration, login, and signup forms, Sitecore CDP runs a linking algorithm to try to match guest data from separate guest profiles, based on your organization's identity rules. We recommend that you learn about identity resolution in Sitecore CDP before you start sending IDENTITY events.
You can send IDENTITY events by using the identity function and passing it the identity event data object.
The identity event data object
The identity event data object represents all the required and optional data about the event.
This is the object where you provide data about the event. All this data is sent to Sitecore, so make sure to provide the correct data depending on your organization's requirements. Construct the object in the following way:
-
Provide the
identifiersarray. In the array, include the name of your organization's identity system and the unique guest identifier provided by that system. -
Optionally, you can:
-
Provide data such as the channel and the language of the page where the event triggered, and personally identifiable information (PII) such as the site visitor's email address, first name, and last name.
-
Include the extension data object.
-
Examples
During development, use your web browser's developer tools to check the payload containing all the event data that is sent to Sitecore.
Here's an example identity event data object for an IDENTITY event. The object contains all the required event data, and some optional event data and extension data:
You can send this event by passing the object to the identity function:
For this identity event data object, the following payload is sent to Sitecore: