> For the complete documentation index, see [llms.txt](https://enterprise-docs.datacamp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enterprise-docs.datacamp.com/integrating-our-data-into-your-tools-via-data-connector-2.0/explore-the-data-model/metrics-tables.md).

# Metrics tables

Metrics tables contain aggregated tabular data. They combine data from fact, dimension, and bridge tables to provide an easy-to-use foundation for reports and dashboards.

* The metric tables available are:
  * [**group\_detail**](#group_detail)
  * [**user\_engagement\_detail**](#user_engagement_detail)
  * [**track\_engagement\_detail**](#track_engagement_detail)
  * [**ai\_tutor\_credit\_usage\_detail**](#ai_tutor_credit_usage_detail)

### group\_detail

This table aggregates activity information per user and day. It can help you build a flexible activity dashboard or report showing activity for the whole organization or per user for any period. Using only this table, for example, you can quickly create a dashboard like the one below:

<figure><img src="/files/hkb0qnKyXgySQfGFNd77" alt=""><figcaption></figcaption></figure>

| Field                         | Description                                                                                                |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------- |
| user\_id                      | The unique identifier of the user                                                                          |
| date                          | The date for which the statistics are aggregated                                                           |
| total\_hours\_on\_learn       | Total time spent by the user on Learn content (assessments, courses, practices, and projects) on that date |
| total\_hours\_on\_courses     | Total time spent by the user on courses on that date                                                       |
| total\_xp\_earned             | The amount of xp the user earned on the given date                                                         |
| nb\_courses\_started          | The number of courses the user has started on the given date                                               |
| nb\_courses\_completed        | The number of courses the user has completed on the given date                                             |
| nb\_chapters\_started         | The number of chapters the user has started on the given date                                              |
| nb\_chapters\_completed       | The number of chapters the user has completed on the given date                                            |
| nb\_exercises\_completed      | The number of exercises the user has completed on the given date                                           |
| nb\_projects\_started         | The number of projects the user has started on the given date                                              |
| nb\_projects\_completed       | The number of projects the user has completed on the given date                                            |
| nb\_practices\_completed      | The number of practices the user has completed on the given date                                           |
| nb\_assessments\_started      | The number of assessments the user has started on the given date                                           |
| nb\_assessments\_completed    | The number of assessments the user has completed on the given date                                         |
| nb\_tracks\_started           | The number of tracks the user has started on the given date                                                |
| nb\_tracks\_completed         | The number of tracks the user has completed on the given date                                              |
| nb\_certifications\_started   | The number of certifications the user has completed on the given date                                      |
| nb\_certifications\_completed | The number of certifications the user has completed on the given date                                      |
| ai\_tutor\_hours\_on\_learn   | Total time spent by the user on Learn AI Tutor content on that date                                        |
| ai\_tutor\_hours\_on\_courses | Total time spent by the user on Learn AI Tutor courses on that date                                        |
| ai\_tutor\_xp\_earned         | The amount of xp the user earned on the given date on AI Tutor content                                     |
| ai\_tutor\_courses\_started   | The number of AI Tutor courses the user has started on the given date                                      |
| ai\_tutor\_courses\_completed | The number of AI Tutor courses the user has completed on the given date                                    |

### user\_engagement\_detail

This table contains activity information per user at the content-item level. It tracks courses, course chapters, projects, and assessments.

This table shows users' activity for particular technologies, topics, or content items. When assigning content to users, it can help you determine who has done what, when they started, who has finished, and how much time they spent on a given set of content items.

| Field               | Description                                                                                                                 |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| user\_id            | The unique identifier of the user                                                                                           |
| content\_id         | The unique identifier of the content unit                                                                                   |
| course\_variant\_id | The course variant identifier. `1` = datacamp, `2` = ai-tutor. Can be joined with `dim_course_variant` for variant details. |
| content\_title      | The title of the content unit                                                                                               |
| started\_at         | The timestamp when the user started the content unit, if available                                                          |
| completed\_at       | The timestamp when the user completed the content unit, if available                                                        |
| hours\_engaged      | The number of hours the user spent on the content unit                                                                      |
| xp\_earned          | The xp points the user earned on the content unit                                                                           |
| pct\_completed      | The completion ratio (0-1.0) based on the xp earned                                                                         |
| content\_type       | The content type of the content unit (course, chapter, project, assessment)                                                 |
| technology          | The technology of the content unit                                                                                          |
| topic               | The topic of the content unit                                                                                               |

### track\_engagement\_detail

This table contains information on the track activity for each user and each track they have enrolled in.

It is the companion to `user_engagement_detail`, but at the track level. Since tracks contain multiple items from different content types (courses, projects, assessments), a different metric table is needed to show the user's progress in the track and its constituent components.

The table shows who has started a track, who has completed it, and each user's detailed progress. It includes the number of courses, chapters, projects, and assessments in the track and the number each user has completed.

| Field                      | Description                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------------ |
| user\_id                   | The unique identifier of the user                                                                            |
| track\_name                | The name of the track                                                                                        |
| category                   | The category of the track (skills, career)                                                                   |
| track\_id                  | The unique identifier of the track                                                                           |
| track\_version\_id         | The unique identifier of the track version. A track can have multiple versions, all with the same `track_id` |
| is\_custom                 | Whether or not a track is custom. If `false`, then the track is a regular (public) track                     |
| is\_current\_version       | Whether or not the version of the track is the most recently published version                               |
| track\_started\_at         | The timestamp when the user started the track.                                                               |
| track\_completed\_at       | The timestamp when the user completed the track. If a user has not completed the track, this field is `null` |
| nb\_courses                | The number of courses that are part of the track                                                             |
| nb\_courses\_completed     | The number of courses the user has completed in this track                                                   |
| nb\_chapters               | The number of chapters that are part of the track                                                            |
| nb\_chapters\_completed    | The number of chapters the user has completed in this track                                                  |
| nb\_projects               | The number of projects that are part of the track                                                            |
| nb\_projects\_completed    | The number of projects the user has completed in this track                                                  |
| nb\_assessments            | The number of assessments that are part of the track                                                         |
| nb\_assessments\_completed | The number of assessments the user has completed in this track                                               |
| xp\_available              | The total XP available for the track                                                                         |
| xp\_earned                 | The XP the user has earned in the track                                                                      |
| pct\_xp\_earned            | The percentage of XP available the user has earned in this track                                             |

### ai\_tutor\_credit\_usage\_detail

This table contains each learner's AI Tutor credit usage and current credit limit for the active 12-month reset window. It can help you monitor AI Tutor credit consumption, remaining credits, and users who have exceeded their current limit.

Each row represents one user in the group. Users with no AI Tutor course usage in the current reset window are included with `credits_used_cum` set to `0`. If no AI Tutor credit limit is configured, limit-derived fields are `null`.

| Field                                 | Description                                                                                                                                        |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| group\_id                             | The unique identifier of the group                                                                                                                 |
| user\_id                              | The unique identifier of the user                                                                                                                  |
| next\_renewal\_date                   | The active subscription term end date used to determine the current reset window                                                                   |
| reset\_window\_start                  | The start date of the active 12-month reset window, inclusive                                                                                      |
| reset\_window\_end                    | The end date of the active 12-month reset window, exclusive                                                                                        |
| credits\_used\_cum                    | The number of AI Tutor credits used by the user in the active reset window. One credit equals one hour of AI Tutor course engagement               |
| credits\_remaining                    | The user's effective AI Tutor credit limit minus credits used, floored at `0`. This is `null` when no effective limit is configured                |
| percentage\_credits\_used             | The share of the user's effective AI Tutor credit limit that has been used. `1.0` means 100%. This is `null` when no effective limit is configured |
| is\_limit\_exceeded                   | Whether the user's credits used are greater than their effective AI Tutor credit limit                                                             |
| last\_credit\_usage\_at               | The timestamp of the user's most recent AI Tutor course engagement event in the active reset window                                                |
| ai\_tutor\_default\_user\_limit       | The default per-user AI Tutor credit limit for members of the group                                                                                |
| ai\_tutor\_custom\_user\_limit        | The user's active custom AI Tutor credit limit, if one is configured                                                                               |
| ai\_tutor\_effective\_user\_limit     | The user's current AI Tutor credit limit after resolving custom, default, then group limits                                                        |
| ai\_tutor\_limit\_source              | The level that provides the effective user limit: `custom`, `default`, or `group`                                                                  |
| ai\_tutor\_custom\_limit\_created\_at | The timestamp when the active custom user limit was created                                                                                        |
| ai\_tutor\_group\_limit               | The current group-level AI Tutor credit allocation, repeated on each user row and used as the final fallback limit                                 |
