> ## Documentation Index
> Fetch the complete documentation index at: https://docs.userpilot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Storage Inventory

> Review every localStorage and sessionStorage item it uses, with its purpose, contents, and lifetime.

The Userpilot SDK sets no cookies. It does use the browser's **localStorage** and **sessionStorage**, which UK/EU privacy rules (PECR/ePrivacy) generally treat the same way as cookies. Separately, Userpilot's hosting load balancer may set one routing cookie on Userpilot's own domain.

***

## Cookies

The Userpilot SDK sets no cookies.

| Cookie | Set on | Purpose | Lifetime |
| :- | :- | :- | :- |
| `AWSALB` / `AWSALBCORS` | Userpilot's real-time endpoint (`*.userpilot.io`), a third-party domain from your app's point of view | May be set by Amazon's load balancer. Purely load-balancing stickiness, so a browser's live connection keeps hitting the same server. Holds an encrypted routing token and no personal data. | The routing preference lasts 30 minutes. |

***

## 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.

| Key | Purpose | Contains | Lifetime |
| :- | :- | :- | :- |
| `userpilotUser<id>` | Identity cache that lets the SDK restore the current user across page loads. | The user ID, the user and company properties passed to `userpilot.identify()`, and the browser, OS, device, language, and hostname. | Persistent. Replaced when a different user is identified, and removed by `userpilot.destroy()`. |
| `userpilotSDK<id>` | A single JSON object that holds the SDK's working state. | See [SDK working state](#sdk-working-state) below. | Persistent. Individual entries are cleared when the related Flow or Checklist ends. |
| `userpilot:session_id` | Analytics session tracking. | A random session number and the last-activity time, stored per user ID. | Persistent. A new session starts after 30 minutes of inactivity. |
| `userpilot:sessions` | Stops the same Flow or NPS survey from appearing in several tabs at once. | Content IDs and timestamps only. | NPS entries are pruned after 24 hours. Tab entries are removed when the tab's session ends. |
| `userpilot:seen-once-flows` | Makes "show once" Flows appear only once. | Flow IDs seen in the current session. | Persistent. Only the current session's entry is kept, and it's replaced when a "show once" Flow is seen in a new session. Removed by `userpilot.reset()`. |
| `_userpilot_TrackData<id>` | Queues custom `track()` events until they're sent. | Not specified. | Usually removed within a second. |

### SDK working state

The `userpilotSDK<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 if `userpilot.anonymous()` is used.

***

## sessionStorage

Items in sessionStorage are cleared when the browser tab closes.

| Key | Purpose | Contains | Lifetime |
| :- | :- | :- | :- |
| `userpilot_session_id` | Per-tab session ID. | A random number and the last-activity time. | Rotates after 30 minutes of inactivity. |
| `userpilot_tab_state` | A flag used to detect duplicated tabs. | Not specified. | Removed when the page unloads. |
| `userpilot_uturn_ring` | Detects quick back-and-forth navigation. Only present when frustration-signal tracking is enabled. | The last 3 page URLs, with query strings masked for emails, tokens, and similar data. | Cleared when the tab closes. |

> [!NOTE]
>
> 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 never `anonymous()`, no anonymous profile is created.

***

## Disabling Browser Storage

To stop the SDK from using localStorage and sessionStorage, set `disableCookies` to `true` before the SDK loads. Despite the name, this setting is about storage.

```javascript theme={null}
window.userpilotSettings = {
   token: "YOUR_USERPILOT_TOKEN",
   disableCookies: true
};
```

> [!WARNING]
>
> With browser storage disabled:
>
> * Flows don't resume across page loads.
> * If you use `userpilot.anonymous()`, every page load creates a new anonymous user, which inflates MAU.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.