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
string
required
Bearer token from authentication
string
default:"30d"
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:number
Current period value
number
Previous period value
number
Absolute change (current - previous)
number
Percentage change from previous period
string
Trend indicator:
up, down, or stableup: changePercent > 5%down: changePercent < -5%stable: -5% to +5%