Analytics

Change how the project identifies visitors

Changed on

mode: cookieless stores nothing on the visitor's device: the proxy stops setting analytics cookies and visitors are counted by a hash that changes every day. Visitors already counted keep their history.

accept_browser_identify: false ignores identify() from the browser, so only the app's backend (a deployment token) can attach a user id. Omitted fields keep their value.

put/projects/{project_id}/analytics/identity

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

project_idinteger required

Project ID

Request body

accept_browser_identifyboolean nullable
mode'persistent' | 'cookieless' nullable

Per-project visitor identity mode.

Response

Identity settings updated

accept_browser_identifyboolean required

Whether identify() from the browser is applied (ADR 109 D4). When false, only the app's backend can identify a visitor. Defaults to true. Ignored in cookieless mode, where identify stores nothing.

limitationsstring[] required

Reports that behave differently in this mode, for the console to say so next to them.

mode'persistent' | 'cookieless' required

persistent (the default): ids stored in a cookie or localStorage, visitors recognised across days. cookieless: nothing stored on the device; a visitor is a new visitor every day.

project_idinteger required
sdk_optionstring nullable

What the browser SDK must be told for this mode, so it writes nothing either: cookieless: true, or data-cookieless="true" on the script tag. None in persistent mode.

updated_atstring date-time required

Changes

    • breaking

      removed the enum value cookieless of the request property mode

    • breaking

      removed the enum value persistent of the request property mode

    • breaking

      the mode request property type changed from string to no type

    4 more changes in this revision