What a profile holds
Set traits with identify
identify upserts a profile: it creates it the first time and updates its traits after that. Identify lists every field of the call.
How traits change
- An
identifychanges only the traits it sends. The others keep their values. - Each trait keeps the value of the
identifywith the latesttimestamp, so a late call with an oldertimestampdoes not overwrite a newer value. - Send
nullfor one of your own traits to remove it. - A
timezoneorlocaleyou send as a trait wins over the one the SDK reads from the browser. - A new profile starts with
emailOptInset totrue. Sendfalsewhen the person has not agreed to email from journeys. An unsubscribe also sets it tofalse. - Once a call made with a secret key sets
email,phoneoremailOptIn, only another secret-key call can change it. A browser call can still fill one while it is empty. - Set those three from your server if you can: send a batch with a secret key that has the
events:writescope. API keys explains the two kinds of key. - Anyone can read the public key in your page, so a browser call can claim to be any person. Identity verification closes that gap with a token your server signs.
Limits
A trait over a limit is skipped, and the rest of the call still applies. A trait name that starts with
$, holds a ., or is __proto__, constructor or prototype is skipped too.
Anonymous visits
Sendidentify with the anonymousId the SDK tagged the earlier events with, and they join the profile (Events shows the flow). The SDK keeps that id in the browser’s storage, and reset() starts a new one: call it on logout, or on a shared browser the next person’s identify picks up the earlier visits. Maqetin joins anonymous visits to a profile, but never merges two profiles that each have a userId.
Read, export or delete a profile
Every member of the workspace can read contacts in the console; only the owner can export or delete one (Contacts). From your server, a secret key with thecontacts:read scope lists, reads and exports profiles, and one with contacts:delete erases one (Contacts API).