---
title: Track Users - Web
description: Link activities to consistent IDs, enabling cross-device analysis and unified user experience insights beyond cookie limitations
lastUpdated: 07 April 2026
source_url:
  html: https://docs.contentsquare.com/en/web/track-users/
  md: https://docs.contentsquare.com/en/web/track-users/index.md
---

> Documentation index: https://docs.contentsquare.com/llms.txt
> Use this file to discover all available pages before exploring further.

Note

This feature is only available for customers of the [User Lifecycle Extension ↗](https://support.contentsquare.com/hc/en-us/articles/37271864562961-Introduction-to-the-User-Lifecycle-extension) or Contentsquare Product Analytics.

Understand your users' complete journey by connecting their interactions across different devices and sessions. By implementing the identify API, move beyond cookie limitations and gain a unified view of individual user behavior:

* **Holistic user understanding:** link user activity across desktops, mobile devices, and over time, providing a true, unified view of their digital experience.

* **Enriched analysis & segmentation:** associate your internal user identifiers (like user IDs, hashed emails, account IDs) with Contentsquare's rich behavioral data. This allows for deeper segmentation and analysis based on your known user attributes.

* **Audience activation:** connect Contentsquare's behavioral insights with your CRM, marketing automation, and other tools by using a consistent user identity across all your tools. This enables precise and effective audience targeting.

* **Privacy-focused flexibility:** you have control over the user identities you send. Use UUIDs, hashed emails, or other data to maintain users' privacy while still achieving a unified view.

## Why use Identify?

Imagine a user who starts a session on your website using their laptop, then switches to their mobile device.

### Without identify

Contentsquare sees two separate users. Analysis of their complete journey is impossible.

![](https://docs.contentsquare.com/_astro/track-users-no-identify-session.65AigwFV_1UQ8hY.webp)

![](https://docs.contentsquare.com/_astro/track-users-no-identify-result.6FRgcfDk_Z2soLDX.webp)

### With identify

You use the identify API with their user identity (for example, their UUID from your CRM). Contentsquare links their activity on both the laptop and the mobile to their identity, providing a complete picture of their behavior.

![](https://docs.contentsquare.com/_astro/track-users-identify-session.BhQx-N_N_5KdCM.webp)

![](https://docs.contentsquare.com/_astro/track-users-identify-result.DTm36OW7_Z2hX0Ap.webp)

## Identifying users

The `identify` command associates the current user with a unique identifier you provide.

```javascript
window._uxa.push(["identify", <identityString>, <options>]);
```

For example, you can identify users with:

* A User ID from your CRM

  ```html
  <script type="text/javascript">
    window._uxa = window._uxa || [];


    // crmUserID = 145612124
    window._uxa.push(["identify", crmUserID]);
  </script>
  ```

* A hashed user email address

  ```html
  <script type="text/javascript">
    window._uxa = window._uxa || [];


    // hashedEmail = bfuKr7A9WgrhAgm2:C2YFJWcfN1yXzUnPfMrv6JivXJvYw==
    window._uxa.push(["identify", hashedEmail]);
  </script>
  ```

Session reset

Calling `identify` for a user who is already identified with a different identity resets the current session, generates a new user ID, and sends a renewal pageview.

Calling `identify` for a user who is already identified with the same identity does **not** reset the session.

```html
<script type="text/javascript">
  window._uxa.push(["identify", crmUserID1]);
  // Contentsquare user ID = 123
  // Identity = uuid1


  // ...


  window._uxa.push(["identify", crmUserID2]);
  // Contentsquare user ID = 456
  // Identity = uuid2
  // Session reset, new user ID and renewal pageview


  // ...


  window._uxa.push(["identify", crmUserID2]);
  // Contentsquare user ID = 456
  // Identity = uuid2
  // No session reset
</script>
```

## Best practices

Be mindful of user privacy and avoid directly identifying identifiers such as name, surname, email addresses but instead to use identifiers such as a customer number or UUID.

If an identifier is directly identifying a data subject, the `identify` command provides a way to hash the identity string client-side, using the `{ hash: true }` option.

```html
<script type="text/javascript">
  window._uxa = window._uxa || [];


  window._uxa.push(["identify", emailAddress, { hash: true }]);
</script>
```

While hashing client-side provides an extra layer of privacy, it's crucial to understand that Contentsquare will store the **hashed value**, which will not match the original identifiers in your CRM or marketing platform.

This makes it significantly more difficult to:

* Join Contentsquare data with data from those systems for comprehensive analysis,
* Activate Contentsquare audiences in external platforms for targeted campaigns.

In most cases, you should send an identifier available in your other tools to maximize data integration and activation capabilities.

For enhanced control and consistency, perform hashing on your server-side or within a centralized data processing pipeline, rather than relying on the client-side `{ hash: true }` option.

This approach ensures that hashing is applied uniformly across all data sources and allows you to manage the hashing process according to your specific security and data governance policies.

## Related identity commands

### `resetIdentity`

Removes any currently associated identity string from the user. This also resets the current session and generate a new anonymous user ID.

```javascript
window._uxa.push(["resetIdentity"]);
```

### `getIdentity`

Checks if the current user has an identity string associated with them. It does not return the exact identity string but a hash of it.

```javascript
window._uxa.push(["getIdentity"]);
```

## Adding user properties

The `addUserProperties` command associates the current user with the given custom properties, overwriting any previously set values for these properties.

```html
<script type="text/javascript">
  window._uxa = window._uxa || [];


  // hashedEmail = bfuKr7A9WgrhAgm2:C2YFJWcfN1yXzUnPfMrv6JivXJvYw==
  window._uxa.push(["identify", hashedEmail]);


  // userProperties = { "accountType": "Premium", "membershipLevel": 3 }
  window._uxa.push(["addUserProperties", userProperties]);
</script>
```

## Next steps

By using the identify API, you unlock a deeper understanding of your users and their digital experiences.

Once you've implemented the identify API, you can leverage the associated user data for:

* Creating advanced segments in Contentsquare based on your user attributes,
* Analyzing user journeys across different devices,
* Integrating Contentsquare insights with your other business intelligence tools or audience activation tools.
