Analytics
Get Analytics with Comparison
Get analytics data with period-over-period comparison
GET
Get Analytics with Comparison
Returns comprehensive analytics data along with comparisons to the previous period of the same length.This endpoint is only accessible to users with
manager or admin roles.Request
Bearer token from authentication
Time range for analytics. Options:
7d, 30d, 90dThe comparison is made against the previous period of the same length. For example, 30d compares the last 30 days to the 30 days before that.Response
The response includes all fields from the base analytics endpoint, plus acomparisons object.
Comparison Object
Each comparison contains:Current period value
Previous period value
Absolute change (current - previous)
Percentage change from previous period
Trend indicator:
up, down, or stableup: changePercent > 5%down: changePercent < -5%stable: -5% to +5%
Available Comparisons
| Field | Description |
|---|---|
tasksCreated | Total tasks created |
tasksCompleted | Total tasks completed |
completionRate | Task completion percentage |
moodAverage | Average mood score |
activeUsers | Number of active users |
flagsCreated | Total flags raised |