> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/sonar/administration/user-activity/users-behavior.md). Agents can also search and read this documentation through its [MCP server](https://wiki.datadike.com/~gitbook/mcp).

# Users Behavior

Consolidated view of one user's activity over a period: active and idle time, top applications and websites, hourly heatmap, daily timeline, PDF reports.

## What this is and when to use it

**Observability › Users Behavior** consolidates what one Windows user did over a period: how long they were active or idle, which applications and websites took their time, at what hours they worked, and how each day was split between active, idle and offline time. Use it to answer "how was this person's week", to prepare a monthly report for a manager, or to generate the same report for a whole team in one job.

The data comes from the productivity module, which runs on Windows devices next to the agent. Users Behavior shows totals and patterns; to see the individual events behind them, open [Users Traces](https://wiki.datadike.com/sonar/administration/user-activity/users-traces.md).

## What the productivity module records

The module runs on **Windows** only. For each user session on the device it records:

| Data         | What is kept                                                                                                                 |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Applications | The application in the foreground: executable name, window title and the program's description, with start time and duration |
| Websites     | For a browser window in the foreground, the address of the page, with start time and duration                                |
| Idle time    | A period with no keyboard or mouse input for **5 minutes** or more, from the last input until activity resumes               |
| Sessions     | Sign-in and sign-out of each Windows user session, used to anchor the activity                                               |

A foreground period shorter than 10 seconds is not recorded. The module sends what it recorded in batches, every one to two and a half minutes, so the console trails the device by a few minutes.

Activity is kept for the number of days set in **Productivity data retention (days)** under **Admin Center › Settings › Retention**. The default is 30 days.

## Before you start

* A role with **View Consolidated** (group **Productivity** in **Admin Center › Roles**). Without it the menu entry does not appear.
* To fill the **Site** and **User** lists, the role also needs **List Sites** (group **Clients & Sites**) and **View Traces** (group **Productivity**).
* The productivity module installed on the Windows devices you want to see. See [The productivity module](https://wiki.datadike.com/sonar/deploy-operate/productivity-module.md).
* For **Send reports by email**, an email server configured in **Admin Center › Settings › Mail Server**.

## Steps

1. Open **Observability › Users Behavior**.
2. In **Site**, choose the site. The list shows only sites where at least one device has reported activity; the first one is selected for you.
3. In **User**, choose the Windows username. The list shows the users seen on that site.
4. In **Time Window**, choose **1D**, **2D**, **7D** or **30D**, counted back from now. For another period, click the calendar button next to it and set a start and an end.
5. Click **Apply Filters**.

The site only narrows the **User** list. Once applied, the view combines the user's activity on every device where it was recorded.

### Download a report for this user

1. Apply the filters as above.
2. Open **Download Report** and choose **Unique&#x20;*****user*****&#x20;Report**.
3. The browser downloads a PDF for the selected user and time window.

### Generate reports for several users

1. Open **Download Report** and choose **Bulk&#x20;*****site*****&#x20;Reports**. The **Bulk Productivity Reports** panel opens.
2. In **Users (usernames)**, select one or more users of the site.
3. Set the **Time Window**, or a custom period with the calendar button.
4. To receive the files by email, tick **Send reports by email** and select the recipients. With no recipient selected, the reports go to the default email addresses shown in the panel.
5. Click **Generate Reports**. The job appears under **Recent Jobs** and runs in the background.
6. When the job is **Completed**, click **Download All Reports (.zip)**, or open **User Details** and download one user's PDF.

## What you should see

After **Apply Filters** the page has three tabs.

**GENERAL**

* A user card with the username, the period, the device where the user spent the most time, how many devices contributed (**source(s)**), and **Latest location**: the most recent position that device reported in the period, shown as an address when one can be resolved, otherwise "No recent location data."
* Five cards: **Total Time**, **Total Active**, **Idle / Inactive**, **Total Applications** and **Total Websites** (see the field reference).
* **Total Active x Idle Time**, a donut with the two shares.
* **Top Applications**: the ten executables with the most foreground time, with the number of events and the total time.
* **Top Websites**: the ten domains with the most time, with the number of visits and the total time.

**HEATMAP**

* **Online Activity Patterns & Insights** with three cards: **Peak Activity** (the most active hour of the day across the period), **Low Activity** (the least active day) and **Period Average** (average active time per day with activity).
* **Hourly Activity Heatmap**: one row per day and one cell per hour. The colour goes from **Low** to **High** with the share of that hour spent in applications and websites.

**TIMELINE**

* **Productivity Timeline**: one row per day with the date, **IN** and **OUT** (the first and last recorded activity of the day), a 24-hour bar split into **Active / Productive**, **Idle / Inactive** and **Offline** blocks, and the day's **Active**, **Idle** and **Offline** totals. Hover a block to see its start, end and duration.
* **Avg Daily Productivity**: active time as a percentage of the full 24 hours of the days shown.

Times are shown in the time zone of your browser.

The PDF from **Unique&#x20;*****user*****&#x20;Report** carries the same information: the user card, the five totals, the active and idle donut, the top four applications and websites, the heatmap with its three insight cards, and the day-by-day timeline.

In **Recent Jobs**, each bulk job shows its status (**Pending**, **In Progress**, **Completed**, **Completed with Errors** or **Failed**), its progress, how many reports were completed or failed, the email recipients and, under **User Details**, one line per user with the file name. Report files are kept for 24 hours after the job finishes.

## How to verify it worked

1. After **Apply Filters**, **Total Time** must show a value other than `0s` for a user who worked on a monitored device in the period.
2. Open [Users Traces](https://wiki.datadike.com/sonar/administration/user-activity/users-traces.md) for the same user and period. The applications listed in **Top Applications** must appear there as application events.
3. For a bulk job, **Recent Jobs** must reach **Completed**, and the ZIP must contain one PDF per selected user. With **Send reports by email**, the envelope icon on the job shows the sending status, and the recipients must receive the ZIP.

## Common errors

| Symptom                                                                    | Cause                                                                                                            | Fix                                                                        |
| -------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| The **Site** list is empty                                                 | No device has reported activity yet, or the role lacks **List Sites**                                            | Check that the productivity module runs on the devices; add the permission |
| The **User** list is empty                                                 | No activity on that site, or the role lacks **View Traces**                                                      | Pick another site, or add the permission                                   |
| "No data available for this user or date range."                           | The user had no recorded activity in the window                                                                  | Widen the time window                                                      |
| "Unable to load consolidated data."                                        | The request to the server failed                                                                                 | Click **Apply Filters** again; if it persists, reload the page             |
| "Select a user and a valid time range before downloading a unique report." | **Unique** report chosen before applying the filters                                                             | Click **Apply Filters** first                                              |
| **Send reports by email** is greyed out                                    | No email server configured. The tooltip reads "You need to configure an email server in Settings -> Mail Server" | Configure **Admin Center › Settings › Mail Server**                        |
| "Please provide at least one username."                                    | **Generate Reports** with no user selected                                                                       | Select at least one user                                                   |
| "End date must be the same as or after start date."                        | Custom period with the end before the start                                                                      | Correct the period                                                         |
| Job ends as **Completed with Errors**                                      | The report for one or more users failed                                                                          | Open **User Details** to see which user and the error                      |

## Field reference

| Field                            | What it does                                          | Accepted values                                                         | Default                     |
| -------------------------------- | ----------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------- |
| **Site**                         | Limits the **User** list to users seen on that site   | Sites with reported activity                                            | First site in the list      |
| **User**                         | The Windows username to report on                     | Usernames seen on the site                                              | First user in the list      |
| **Time Window**                  | Period to report, counted back from now               | **1D**, **2D**, **7D**, **30D**, or **Custom** with the calendar button | **7D**                      |
| **Total Time**                   | Active plus idle time                                 | Duration                                                                | —                           |
| **Total Active**                 | Time with an application or website in the foreground | Duration                                                                | —                           |
| **Idle / Inactive**              | Time with no input for 5 minutes or more              | Duration                                                                | —                           |
| **Total Applications**           | Foreground time in applications other than web pages  | Duration                                                                | —                           |
| **Total Websites**               | Foreground time on web pages                          | Duration                                                                | —                           |
| **Users (usernames)** (bulk)     | Users to generate a report for                        | One or more users of the site                                           | None                        |
| **Send reports by email** (bulk) | Emails the ZIP when the job finishes                  | On or off; needs a mail server                                          | Off                         |
| Recipients (bulk)                | Who receives the email                                | Console users with an email address                                     | The default email addresses |

## Related pages

* [Users Traces](https://wiki.datadike.com/sonar/administration/user-activity/users-traces.md) — the individual events behind these totals
* [Geolocation](https://wiki.datadike.com/sonar/administration/user-activity/geolocation.md) — where the **Latest location** comes from
* [The productivity module](https://wiki.datadike.com/sonar/deploy-operate/productivity-module.md)
* [Data retention](https://wiki.datadike.com/sonar/administration/settings/retention.md)
* [Roles and permissions](https://wiki.datadike.com/sonar/administration/identities/roles.md)
