Reports a user identification
Use to identify visitors at any point during their journey on your site or app, such as during the checkout process.
Parameters
- name: Human-readable name, not used to identify an event type
- properties: A container for the event properties as specified in the following table:
Property | Description | Type |
---|---|---|
dyType | Must be "identify-v1" | String |
cuid | User identifier value | String |
cuidType | Use this identifier type to identify users across devices (for example, customer_id or account_id). Note: Do not include any personal information in this ID. | String |
hashedEmail Optional | SHA-256 encoding of the lowercase email address. You can use this identifier type instead of cuid and cuidType. | String |
phoneNumber Optional | You can add the user’s phone number as another identification property. Can be used for triggering SMS campaigns. | A phone number (national and local numbers) in E.164 format. |
Example: Implementation via script, using hashed email address
DY.API("event", {
name: "Identify",
properties: {
dyType: "identify-v1",
hashedEmail: DYO.dyhash.sha256("[email protected]".toLowerCase()), // SHA256 encoding of the lowercase email.
phoneNumber:"+972503803434"
}
});
Example: Implementation via script, using cuid
DY.API("event", {
name: "Identify",
properties: {
dyType: "identify-v1",
cuid: "95764245",
cuidType: "EcommerceID",
phoneNumber:"+972503803434"
}
});
Example: Implementation via Experience API (server-side), using hashed email address
״events״:[
{
"user": {
"dyid": "7282320792394869879",
"dyid_server": "7282320792394869879"
},
"session": { "dy": "e3xi77qrxbsxxxmi18d8kxek6tdd12qj" },
"events": [
{
"name": "Identify User",
"properties": {
"dyType": "identify-v1",
"hashedEmail": "62eccc43b550b012b7ea7fb07e64baafb1508d8b715a55148ccf0f3322eab1a1"
}
}
]
}
]
Example: Implementation via Experience API (server-side), using cuid
"events": [
{
"name": "Identify User",
"properties": {
"dyType": "identify-v1",
"cuidType": "clientId", //You can use any type you want to
"cuid": "62eccc43b550b012b7ea7fb07e64baafb1508d8b715a55148ccf0f3322eab1a1"
}
}
]