# Cookies & Storage

## Why Cookies?

Whether it is privacy regulation or third-party cookie blocking by browser vendors, cookies have a lot of baggage associated with them. Lucky Orange only uses cookies in situations where it is helpful to store information across subdomains within a single website. For example, it is helpful to identify a single visitor across app.example.com and [www.example.com](http://www.example.com). **Lucky Orange never uses third-party cookies**.

### Cookie disclosure

| Name            | Purpose                                                                                                                             | Expiration |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------: |
| lo-domain-check | Created temporarily to determine the top-level domain for the website and then immediately deleted.                                 |  Instantly |
| lo-opt-out      | Indicates that the visitor has opted out of tracking and will prevent the browser library from running.                             |    2 Years |
| lo-uid          | Identifies the visitor using a unique ID. Related sessions, events, and conversations are linked to a single visitor using this ID. |    2 Years |
| lo-visits       | Keeps a count of the number of unique sessions for a visitor. This is represented as the "Visit #" in the app.                      |    2 Years |

{% hint style="info" %}
All cookies are **secure**, have **samesite set to strict**, and have an **explicitly set domain.**
{% endhint %}

## Local Storage

All other data is stored within the browser's local storage. To keep things clean, instead of creating many top level keys, there are three keys that contain well structured objects that explain exactly what Lucky Orange is storing:

* `lo-session`
* `lo-messenger` (Only used when taking advantage of Announcements, Chat, or Surveys)
* `lo-visitor`


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.luckyorange.com/libraries/browser/cookies-storage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
