Skip to main content

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​

MethodEndpointDescription
GET/players/{id}/analytics/summaryGet the summary for a date window
GET/players/{id}/analytics/studentsList students
GET/players/{playerId}/analytics/students/{id}/lessonsList one student's lessons
GET/players/{id}/analytics/lessonsList completion per lesson
GET/players/{id}/analytics/certificatesList issued certificates
POST/players/{playerId}/analytics/certificates/{id}/regenerateRefresh 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​

FieldTypeDescription
date_rangeobjectDate Range Object for this window
students_countintegerCustomers who ordered inside the window
visits_countintegerVisits inside the window
lesson_completions_countintegerLessons marked done across all students, from the course start through the end of the window. Not a number of lessons.
progress_percentintegerAverage progress, 0–100, from the course start through the end of the window
lessons_countintegerLive lessons now. Headings are excluded and hidden lessons are included. Not on previous.
previousobject|nullThe 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​

FieldTypeDescription
fromstringFirst day of the window, YYYY-MM-DD, inclusive
tostringLast day of the window, YYYY-MM-DD, inclusive
timezonestringIANA timezone the window was resolved in

Student Object​

FieldTypeDescription
idstring|nullStudent id: 32 hexadecimal characters without dashes. null when the customer has no Easytools account.
full_namestringCustomer name
emailstringCustomer email
ordered_atstring|nullISO 8601 timestamp (UTC) of the order
first_visited_atstring|nullISO 8601 timestamp (UTC) of the first visit
last_visited_atstring|nullISO 8601 timestamp (UTC) of the last visit
visits_countintegerNumber of visits. 0 when there are none.
progress_percentinteger|nullProgress, 0–100. null only when id is null.
has_certificatebooleantrue when the student was issued a certificate
order_urlstring|nullLink to the order in the Easycart dashboard
customer_urlstring|nullLink to the customer in the Easycart dashboard

Lesson Stat Object​

FieldTypeDescription
file_idstringLesson UUID from the files collection
namestringLive lesson name
finished_countintegerStudents who finished this lesson
progress_percentintegerShare of students who finished this lesson, 0–100
public_urlstringVisitor link that opens this lesson: {origin}/players/{slug}?file_uuid={file_id}

Certificate Object​

FieldTypeDescription
idstringCertificate id. A short URL-safe id, not a UUID.
full_namestringName printed on the certificate. May be empty.
issued_atstringISO 8601 timestamp (UTC) when the certificate was issued. Regenerate does not change it.
public_urlstringPublic certificate page: {origin}/players/{slug}/certificates/{id}