Analytics
Analytics are the numbers for one live course: students, visits, lesson completion, and issued certificates. These routes stay under /players/{id}/analytics. In these pages a lesson is the curriculum item the HTTP paths call a file.
Overview
Every analytics route reads the live course, not pending edits. The routes return no preview_url, draft_version, or draft_updated_at, and they do not send draft_version. See Draft, preview, and publish.
Get Summary is the headline for a date window and the window right before it. List Students is one page of buyers with visits and progress. List Student Lessons shows which lessons one student finished. List Lesson Stats is completion per lesson. List Certificates is one page of issued certificates. Regenerate Certificate refreshes the name printed on one of them, and is the only write in this group.
A team member can call these routes without Manage courses or Publish courses. A caller who is not the workspace owner and not on that owner's team receives 403 FORBIDDEN. The summary, students, student lessons, and lesson stats read Easycart: when Easycart is unreachable or failing they return 503 SERVICE_UNAVAILABLE, and when it answers with something the API cannot use, 502 UPSTREAM_ERROR. A course id that is missing or not a UUID returns 404. See Identifiers.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /players/{id}/analytics/summary | Get the summary for a date window |
| GET | /players/{id}/analytics/students | List students |
| GET | /players/{playerId}/analytics/students/{id}/lessons | List one student's lessons |
| GET | /players/{id}/analytics/lessons | List completion per lesson |
| GET | /players/{id}/analytics/certificates | List issued certificates |
| POST | /players/{playerId}/analytics/certificates/{id}/regenerate | Refresh the name on a certificate |
Date Window
Only Get Summary takes a window. date is one of all, today, last7days, last14days, last30days, last3months, last12months, lastMonth, monthToDate, or yearToDate, or an inclusive range YYYY-MM-DD,YYYY-MM-DD. The default is all, which runs from 2021-01-01 through today. lastN runs from today minus N days through today. Values are case-sensitive.
The window is resolved in the server timezone. The response echoes the resolved dates and that timezone in date_range. There is no timezone parameter. An unknown value, a date that does not exist, or a range that ends before it starts is 422 with details.date.
The students list, the lesson stats, and the certificates list are not filtered by the window.
Summary Object
| Field | Type | Description |
|---|---|---|
date_range | object | Date Range Object for this window |
students_count | integer | Customers who ordered inside the window |
visits_count | integer | Visits inside the window |
lesson_completions_count | integer | Lessons marked done across all students, from the course start through the end of the window. Not a number of lessons. |
progress_percent | integer | Average progress, 0–100, from the course start through the end of the window |
lessons_count | integer | Live lessons now. Headings are excluded and hidden lessons are included. Not on previous. |
previous | object|null | The window of the same length right before, with every field above except lessons_count. null for all. null means there is no comparison, not zero. |
Date Range Object
| Field | Type | Description |
|---|---|---|
from | string | First day of the window, YYYY-MM-DD, inclusive |
to | string | Last day of the window, YYYY-MM-DD, inclusive |
timezone | string | IANA timezone the window was resolved in |
Student Object
| Field | Type | Description |
|---|---|---|
id | string|null | Student id: 32 hexadecimal characters without dashes. null when the customer has no Easytools account. |
full_name | string | Customer name |
email | string | Customer email |
ordered_at | string|null | ISO 8601 timestamp (UTC) of the order |
first_visited_at | string|null | ISO 8601 timestamp (UTC) of the first visit |
last_visited_at | string|null | ISO 8601 timestamp (UTC) of the last visit |
visits_count | integer | Number of visits. 0 when there are none. |
progress_percent | integer|null | Progress, 0–100. null only when id is null. |
has_certificate | boolean | true when the student was issued a certificate |
order_url | string|null | Link to the order in the Easycart dashboard |
customer_url | string|null | Link to the customer in the Easycart dashboard |
Lesson Stat Object
| Field | Type | Description |
|---|---|---|
file_id | string | Lesson UUID from the files collection |
name | string | Live lesson name |
finished_count | integer | Students who finished this lesson |
progress_percent | integer | Share of students who finished this lesson, 0–100 |
public_url | string | Visitor link that opens this lesson: {origin}/players/{slug}?file_uuid={file_id} |
Certificate Object
| Field | Type | Description |
|---|---|---|
id | string | Certificate id. A short URL-safe id, not a UUID. |
full_name | string | Name printed on the certificate. May be empty. |
issued_at | string | ISO 8601 timestamp (UTC) when the certificate was issued. Regenerate does not change it. |
public_url | string | Public certificate page: {origin}/players/{slug}/certificates/{id} |