# User Tracking

User Tracking connects your LLM activity to the people using your application. By associating traces with user identifiers, you gain visibility into **individual consumption patterns**, can debug issues for specific users, and understand how different segments interact with your system. This feature is optional but highly recommended.

### Why User Tracking Matters

System-wide averages tell you how your application performs overall, but not how individual users experience it. User tracking lets you:

* Identify your heaviest consumers and **understand usage distribution**
* Spot users experiencing disproportionate **errors** or **latency**
* Compare **behavior patterns** across different user segments
* Track **individual user journeys** through your LLM application
* **Monitor** token usage, costs, and other metrics **on a per-user basis**
* Filter and segment traces to **debug user-reported issues**

***

### User Views

#### All Users View

This view lets you segment by overall token usage, number of traces, and total cost making it easy to **identify power users** and **usage patterns**.

<div data-with-frame="true"><figure><img src="/files/dDADqXSOMwuPlhwBxca9" alt=""><figcaption></figcaption></figure></div>

#### Individual User View

Selecting a user opens their **detail page** with:

* Aggregated statistics (observations, traces, tokens, cost, active period)
* Complete trace history for that user
* Session history showing multi-turn conversations
* Score history for quality tracking

<div data-with-frame="true"><figure><img src="/files/0sR3j5vnQawV8dgfGBLg" alt=""><figcaption></figcaption></figure></div>

This view is useful for debugging user-reported issues, understanding power-user behavior, and auditing activity for compliance or support purposes.

***

### Properties of a User

| Property         | Description                                      |
| ---------------- | ------------------------------------------------ |
| **User ID**      | Unique identifier for the user                   |
| **First Event**  | Timestamp of the user's first recorded trace     |
| **Last Event**   | Timestamp of the user's most recent trace        |
| **Total Events** | Number of traces attributed to this user         |
| **Total Tokens** | Cumulative token consumption across all activity |
| **Model Cost**   | Accumulated cost of all operations for this user |

***

### Tracking Users

To track users, include a `user_id` when creating traces. This can be any **unique string** that identifies a user in your system: a username, email address, internal ID, or any other distinct identifier. The field is optional, but populating it unlocks the full set of **user-centric analytics**.

For details on how to set `user_id` on traces, see [Updating a Trace](/govern/traces.md#updating-a-trace).


---

# 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://docs.interactive.ai/report/user-tracking.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.
