> For the complete documentation index, see [llms.txt](https://dev.pointr.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.pointr.tech/v9/features/analytics/device-id-and-session-id.md).

# Device ID & Session ID

Learn how Pointr generates anonymous Device IDs and Session IDs across mobile, web, and Express, and when each identifier changes.

## Device ID <a href="#device-id-explained" id="device-id-explained"></a>

**Device ID** is a **unique** 16-character GUID created so that Pointr Cloud can authenticate and relate data to a unique application using Pointr Mobile / Web SDKs.

Device IDs are generated based on best practices suggested by the corresponding platforms.

* **iOS SDK** uses [`identifierForVendor`](https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor) as recommended by Apple.
* **Android SDK** uses a hash generated by combining [`Settings.Secure.ANDROID_ID`](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID) and current application package. For devices where Google API is not supported, Pointr generates a globally unique ID upon SDK initialization.
* **Web SDK** generates a GUID on the fly using [Javascript’s built-in crypto library](https://developer.mozilla.org/en-US/docs/Glossary/UUID) and stores it in localStorage.

{% hint style="info" %}

#### All Device IDs are **anonymous by design**.

Developers are able to couple our unique and anonymous Device IDs with existing user IDs on their end (eg. “email”, “loyalty number”) to map the actual user profiles they have. However, Pointr does not have access to this information and does not store Device IDs for any purpose.

Device IDs cannot be used to track the precise phone of origin, device’s phone number, owner’s name, serial number or any other information that could lead to a privacy breach.
{% endhint %}

#### When does a new Device ID get generated?

| Pointr Mobile SDK                                                               | Pointr Express                                                                  | Pointr Web SDK                                                                           |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| <ul><li>New device</li><li>Clearing App Data</li><li>Reinstalling App</li></ul> | <ul><li>New device</li><li>Clearing App Data</li><li>Reinstalling App</li></ul> | <ul><li>Changing Browser</li><li>Clearing browsing data</li><li>Incognito mode</li></ul> |

*Device ID persistence characteristics are summarized in the table below:*

<table><thead><tr><th width="294.078125"></th><th>iOS</th><th>Android</th></tr></thead><tbody><tr><td><strong>While app is installed</strong></td><td>Persistent</td><td>Persistent</td></tr><tr><td><strong>Same device, different app</strong></td><td>New ID</td><td>New ID</td></tr><tr><td><strong>App uninstalled and re-installed</strong></td><td>New ID</td><td>Persistent</td></tr><tr><td><strong>Owner changed device</strong></td><td>New ID</td><td>New ID</td></tr><tr><td><strong>Device factory reset</strong></td><td>New ID</td><td><em>Uncertain</em></td></tr></tbody></table>

{% hint style="warning" %}
On Android, it is possible to root a device and tamper with the system’s `ANDROID_ID` which may cause our SDK to malfunction (or worse, allow a different user to impersonate another existing user). We do not support rooted device cases as such and we recommend against rooted Android devices.
{% endhint %}

#### Device ID in Pointr Express

When running an App Clip, iOS returns the `identifierForVendor` in all zeros *(not documented by Apple)*. Due to this issue, Pointr Express generates the `UUID` in the SDK and stores it as the **Device ID**.

Since the system deletes App Clip data after 10 days of non-use, the stored UUID is also deleted. When that happens, the SDK generates a new Device ID - `UUID`

### Session ID <a href="#session-id" id="session-id"></a>

Session IDs are used to **measure usage across different sessions** from the same device.

#### **When does a new Session ID get generated?**

| Pointr Mobile SDK                                                                                                                         | Pointr Express                                                                                                                            | Pointr Web SDK                                                                                                                                        |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| <ul><li>When app is killed</li><li>When app is background without any activity for at least 30 minutes <em>(configurable).</em></li></ul> | <ul><li>When app is killed</li><li>When app is background without any activity for at least 30 minutes <em>(configurable).</em></li></ul> | <ul><li>When browser is closed</li><li>When there is no activity for 30 seconds <em>(default recommendation for kiosks, configurable)</em>.</li></ul> |


---

# 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://dev.pointr.tech/v9/features/analytics/device-id-and-session-id.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.
