get_analytics
Retrieve aggregated analytics for organizational goals: cohort KPIs, at-risk learners, completion funnels, and resource engagement. Filter by metadata and group by dimensions like track or cohort.
Instructions
Get aggregated analytics for your organization's goals.
Returns cohort KPIs (total, active, completed, blocked), claim metrics (activation rate, time-to-claim), at-risk learners (inactive for N days), an optional step-level completion funnel, and optional resource engagement breakdown.
Use groupBy to break down completion rates by a metadata dimension (e.g. groupBy="track" shows completion rates for frontend, backend, etc).
Use the metadata filter to narrow the scope to a specific cohort or department (e.g. metadata={cohort: "spring-2026"}).
Examples:
"How is the spring 2026 cohort doing?" -> get_analytics({ metadata: { cohort: "spring-2026" } })
"Which track has the highest completion rate?" -> get_analytics({ groupBy: "track" })
"How many students are at risk this week?" -> get_analytics({ inactiveDays: 7 })
"Show me the step-by-step funnel for the frontend track" -> get_analytics({ metadata: { track: "frontend" }, includeFunnel: true })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date_to | No | ISO date (YYYY-MM-DD). Only include goals created on or before this date. | |
| group_by | No | Metadata key to group completion rates by (e.g. 'track', 'cohort', 'department'). Returns a completionByDimension breakdown. | |
| metadata | No | Filter to a specific cohort or segment by metadata tags (e.g. {cohort: 'spring-2026', track: 'frontend'}). | |
| date_from | No | ISO date (YYYY-MM-DD). Only include goals created on or after this date. | |
| inactive_days | No | Goals with no step activity in this many days are flagged as at-risk. Default: 7. | |
| include_funnel | No | Include the step-by-step completion funnel showing where learners drop off. | |
| include_resources | No | Include resource engagement breakdown (video vs article, AI vs user-added). |