> For the complete documentation index, see [llms.txt](https://docs.userlane.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.userlane.com/security-and-privacy/cookies-and-tracking-transparency.md).

# Cookies and tracking transparency

Every cookie and local storage item the Userlane product sets, and the opt-out implementation.

Userlane sets a small number of cookies and one local storage item to maintain session state, remember UI preferences, and, when HEART[^1] analytics is enabled, track application sessions. This page covers the cookies set by the Userlane product: the portal and the Userlane content that runs inside your applications. Cookies on the Userlane marketing website are described in the website's Cookie Policy.

For how Userlane processes the data these cookies collect, see the [data processing agreement](https://userlane.com/dpa).

## When to include Userlane in a cookie policy

Whether Userlane needs to appear in the organization's cookie policy or consent banner is the organization's own decision, usually made by its data protection officer. It typically depends on who the end users are: employees, the organization's own customers or partners, or private individuals using a consumer-facing application. The cookie table below provides the information needed for that assessment.

Userlane cookies are functional, not marketing or advertising cookies. They do not track users across third-party sites and are not used for profiling or ad targeting. If the organization's consent tool distinguishes essential cookies from functional cookies, Userlane sits under functional.

## Cookies Userlane sets

The table below lists every cookie and local storage item that Userlane's embeddable frontend package may store on the end user's device.

<table><thead><tr><th width="118.66497802734375">Name</th><th width="123.73095703125">Type</th><th width="344.8333740234375">Purpose</th><th width="105.4713134765625">Duration</th><th width="101.8758544921875">Required</th></tr></thead><tbody><tr><td><code>userlane-context</code></td><td>Cookie</td><td>Stores the state of the Userlane UI and the current context (for example, which guide is active and at which step) so that a guide continues seamlessly when the user navigates between pages or domains. Also keeps the Editor open across page changes for content authors.</td><td>5 minutes</td><td>Yes</td></tr><tr><td><code>userlane-app-session</code></td><td>Cookie</td><td>Stores the analytics session so that application-level events can be aggregated and attributed correctly.</td><td>30 minutes</td><td>Only when HEART analytics is enabled</td></tr><tr><td><code>userlane-user</code></td><td>Cookie</td><td>Stores a randomly generated user ID so that the Assistant can show consistent progress (for example, which guides have been completed). Used only when no user ID is passed through the implementation.</td><td>5 years</td><td>Only when no user identifier is passed</td></tr><tr><td><code>userlane-assistant-context</code></td><td>Local storage</td><td>Stores the state of the Assistant, including its position on the screen if the user has moved it by dragging.</td><td>Indefinite</td><td>Yes</td></tr><tr><td><code>AUTH_SESSION_ID</code></td><td>Cookie (third-party, Keycloak)</td><td>Stores the authentication session ID during the portal login flow.</td><td>Session</td><td>Only for users with portal access</td></tr><tr><td><code>KEYCLOAK_IDENTITY</code></td><td>Cookie (third-party, Keycloak)</td><td>Stores a JSON Web Token (JWT) that verifies the user's identity and authorization roles after login.</td><td>Session</td><td>Only for users with portal access</td></tr><tr><td><code>KEYCLOAK_SESSION</code></td><td>Cookie (third-party, Keycloak)</td><td>Stores the session ID for an authenticated portal user so that Keycloak can determine whether the user is still logged in.</td><td>Session</td><td>Only for users with portal access</td></tr></tbody></table>

The three Keycloak cookies are set only for users who access the Userlane portal directly, such as content authors working in the Editor[^2]. End users who interact with Userlane only through the browser extension or the Assistant do not receive them.

## Implement cookie opt-out

{% hint style="info" %}
Cookie opt-out applies where end users must consent to cookies, usually on customer-facing applications. A user who opts out gets no Userlane at all, including content. Most business-to-business (B2B) deployments do not need this.
{% endhint %}

The opt-out works in two steps: gating initialization on consent, and removing Userlane if consent is revoked.

### Step 1: Initialize Userlane only after consent

The `Userlane('init', property_id)` command starts Userlane on the page. Configure the consent logic so that this command fires only after the user has accepted functional cookies.

The ID in the command identifies the organization's Userlane application and is available in the Userlane portal.

```javascript
// Example: initialize only after cookie consent
if (userHasAcceptedFunctionalCookies()) {
  Userlane('init', 'your_property_id');
}
```

### Step 2: Remove Userlane if consent is revoked

If the user later changes their cookie preferences and declines functional cookies, call the remove command to withdraw Userlane from the page immediately.

```javascript
// Example: remove Userlane when consent is revoked
Userlane('removeUserlane');
```

The `removeUserlane` command is global and does not require an ID.

After calling `removeUserlane`, the organization's consent logic must also store the user's updated preference so that `Userlane('init')` is not called again on the next page load.

## Relevant articles

{% content-ref url="/pages/SRW9iMERFNl0SSjAfJnd" %}
[Environment prerequisites](/deployment/rollout/environment-prerequisites.md)
{% endcontent-ref %}

{% content-ref url="/pages/JaoydeD5UPCYFS9NuupA" %}
[Quick reference of commands](/developer-reference/quick-reference-of-commands.md)
{% endcontent-ref %}

{% content-ref url="/pages/14ViydxzHwBkmZMnQj6h" %}
[AI features: what data is processed and where](/security-and-privacy/ai-features-what-data-is-processed-and-where.md)
{% endcontent-ref %}

{% content-ref url="/pages/xcPtcZYHoLK0Dpnih9zv" %}
[EU Data Act: data categories and portability](/security-and-privacy/eu-data-act-data-categories-and-portability.md)
{% endcontent-ref %}

## FAQ

<details>

<summary>Does Userlane use marketing or advertising cookies?</summary>

No. Userlane cookies are functional. They maintain session state, remember UI preferences, and, when enabled, track application sessions for HEART. They do not track users across third-party sites and are not used for profiling or ad targeting.

</details>

<details>

<summary>What happens if a user opts out?</summary>

When the organization calls `Userlane('removeUserlane')`, Userlane is withdrawn from the page. No further cookies are set and no analytics events are recorded for that user until `Userlane('init')` is called again. The organization is responsible for storing the user's preference so that initialization does not fire again without renewed consent.

</details>

<details>

<summary>Do I need to list Userlane in my cookie banner for an internal deployment?</summary>

That is the organization's decision, usually made by its data protection officer or works council. The cookie table in this article provides the information needed.

</details>

[^1]: HEART is Userlane's five-dimension model for scoring how well an application works for the people using it, on a scale of 0 to 100.

[^2]: The Editor is the workspace where Userlane content is built, separate from the portal where content is targeted and analytics are viewed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.userlane.com/security-and-privacy/cookies-and-tracking-transparency.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
