This API will work for any browser edition (Browser Lite, Pro, or Pro+SPA).
Adds a user-defined identifier string to subsequent events on the page.
Agent version 1.230.0 or higher.
Upon executing this function with a valid value, the browser agent records the value as the
enduser.id attribute with all events until the attribute is manually unset. The identifier will be stored in the browser, so that subsequent page visits of the same origin attach it on events within a session span. Note that this functionality may fluctuate depending on end-user browser privacy settings. If this function is called with a
value = null, any existing user ID will be deleted from both the current page's events and the storage.
string OR null
Required. A string identifier for the end-user, useful for tying all browser events to specific users. The
Marking an end user's "start of session"
Stopping events from attributing to current user