Cookies
The Userpilot SDK sets no cookies.localStorage
Items in localStorage persist until they’re cleared. In the key names below,<id> is a fixed numeric suffix derived from your Userpilot app token.
SDK working state
TheuserpilotSDK<id> object contains:
- Progress of a running Flow, so it resumes after navigation.
- Flow, Checklist, and Survey hand-offs between pages.
- Theme settings.
- Session replay configuration.
- A short-lived queue of identify data, kept until the server confirms it.
- The anonymous ID (
userpilot-un-id), only ifuserpilot.anonymous()is used.
sessionStorage
Items in sessionStorage are cleared when the browser tab closes.Some extra sessionStorage keys appear only while an admin previews content with the Userpilot builder or Chrome extension. They never appear in normal end-user sessions.
Anonymous and Identified Users
userpilot.anonymous()generates a random ID (<app token>_<random number>) and stores it in localStorage, so the same browser keeps the same anonymous profile.- If the user later logs in and
userpilot.identify()is called, only the new user ID is sent. There’s no alias or merge step on the client or the server, so anonymous activity stays on the separate anonymous profile and is never linked to the identified user. - Anonymous users count toward monthly active users (MAU). If you only call
identify()and neveranonymous(), no anonymous profile is created.
Disabling Browser Storage
To stop the SDK from using localStorage and sessionStorage, setdisableCookies to true before the SDK loads. Despite the name, this setting is about storage.