← Documentation

Distinct IDs

A distinct ID is a stable label for a user—e.g. an anonymized hash or, after login, an account id. It links pageviews, events, and conversions to the same person across visits and devices.

To store more than an ID (e.g. plan, role), use Session data in Tracker functions.

When to use it

  • Attribute conversions and behavior to the right user.
  • Stitch behavior across sessions or devices.
  • Separate new vs. returning users.
  • Power journeys, retention, or simple user-level views.

How to send it

Include an id field in the payload. Maximum 50 characters.

{
  "payload": {
    "hostname": "your-hostname",
    "language": "en-US",
    "referrer": "",
    "screen": "1920x1080",
    "title": "dashboard",
    "url": "/",
    "website": "your-website-id",
    "id": "user@example.com"
  },
  "type": "event"
}

Finding sessions by distinct ID

In the Sessions report, use the search to filter by distinct ID. You’ll see all sessions for that ID in the chosen date range.