cohorts.compare
Compare two saved cohorts side-by-side on retention to determine which group retains better. Returns each cohort's size and retention curve over the same period, enabling direct comparison without manual calculation.
Instructions
Compare two saved cohorts side-by-side on retention. Returns each cohort's size and retention curve over the same period set, so you can read "did this week's signups retain better than last week's?" or "is this experiment cohort behaving differently than control?" without composing the rates manually.
Examples:
"did April 14 signups retain better than April 7" → a="signups_apr_14", b="signups_apr_07"
"are pro-plan signups stickier than free" → a="pro_signups_q2", b="free_signups_q2"
"compare two onboarding variants out to 4 weeks" → a="onboarding_v1", b="onboarding_v2", periods="1w,2w,4w"
Limitations: only two cohorts at a time. The same retention windows are applied to both — there's no way to use different windows per side. Sample-size caveats apply per cohort; check both size values before reading the rate delta.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Target project ID (e.g. "proj_abc123"). Required when the credential has access to multiple projects. If omitted and only one project is accessible, that project is used automatically. Call `projects.list` to discover available project IDs. | |
| a | Yes | Name of the first cohort. | |
| b | Yes | Name of the second cohort. | |
| periods | No | Comma-separated retention windows, same format as cohorts.retention. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |