v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Analytics

Get cohort analytics data

Returns cohort-over-time tables for the project. A cohort is a group of users sharing an acquisition event (see cohort_definition). Rows are cohorts, columns are time offsets (see grouping). Cells are the metric (revenue, subscriptions, payers, ARPU, ARPPU).

Use GET /v4/analytics/cohorts/meta to discover valid filter attributes and their concrete values for the project.

get/analytics/cohorts

Query parameters

cohort_frominteger

Cohort-range start (Unix timestamp, seconds). Defaults to now - 90 days.

cohort_tointeger

Cohort-range end (Unix timestamp, seconds). Defaults to the current time. Normalised to the next day's 00:00 UTC on the server.

mode'by_renewals' | 'by_days'
  • by_renewals — columns are subscription renewal indexes (P1, P2, …).
  • by_days — columns are calendar offsets from the cohort start.
grouping'day' | 'week' | 'month' | 'quarter' | 'year'

Column (period) granularity.

environment0 | 1

Environment: 0 = sandbox, 1 = production.

cohort_definition'new_customers' | 'initial_conversions' | 'new_paying'

What event defines cohort membership.

  • new_customers — first app install / user creation.
  • initial_conversions — first trial or paid conversion.
  • new_paying — first paid transaction.
revenue_type'gross' | 'net'
  • gross — raw transaction values.
  • net — after refunds and store commission.
currencystring

ISO 4217 currency code for monetary cells. Non-USD values are converted at the transaction's historical rate.

group_bystring

Optional segmentation attribute — when set, response includes a segments array, one entry per attribute value. Allowed values match filter_conditions[].attribute from cohorts/meta.

filter[<attribute>][]string[]

Same attribute-scoped filter schema as the charts endpoint.

Response

Cohort table.

object'analytics_cohorts' required
urlstring required
mode'by_renewals' | 'by_days' required
grouping'day' | 'week' | 'month' | 'quarter' | 'year' required
cohort_frominteger required
cohort_tointeger required
currencystring required
period_labelsstring[] required

Column labels — P1, P2, … for by_renewals, date strings for by_days.

cohortsobject[] required

One row per cohort window. Empty when the project has no qualifying cohorts in the range.

totalobject nullable

Aggregated totals row. Null when the table is empty.

max_valuesobject required

Maximum per-metric value across the table — used for heatmap coloring in the UI.

group_bystring

Present only when group_by was supplied on the request.

segmentsobject[]

Present only when group_by was supplied. One entry per segmentation value.