> 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)

### 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                                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://enterprise-docs.datacamp.com/integrating-our-data-into-your-tools-via-data-connector-2.0/explore-the-data-model/metrics-tables.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.
