Analytics

Identify a visitor of the token's own project (ADR 109 D4)

Changed on

The form a deployed app uses: the project comes from its injected deployment token, so the app needs no project id. Behaves exactly like PUT /projects/{project_id}/analytics/visitors/{visitor_id}/identify, which callers without a project-scoped token use instead.

put/analytics/visitors/{visitor_id}/identify

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

visitor_idstring required

The sealed enc_... value of the _temps_visitor_id cookie, or the browser tracker's stored visitor id sealed the same way. Deployment tokens may only pass a sealed value.

Request body

traitsobject nullable

Traits merged into the visitor's custom_data at the top level; a key set to null is removed. At most 32 keys and 8 KB.

user_idstring required

The app's own id for the person (database id, UUID, email). At most 256 characters, no control characters.

Response

What identify did. applied: false with an outcome says why nothing was stored (unknown visitor, cookieless project).

appliedboolean required

Whether the visitor carries the requested identity now (updated or unchanged).

messagestring required
outcome'updated' | 'unchanged' | 'visitor_not_found' | 'cookieless_project' | 'browser_identify_refused' | 'server_identity_kept' required

What an identify call did.

Changes