Cohort Retention
get_retentionCalculates weekly cohort retention for a product, showing the share of users active each subsequent week after their first seen week. Groups users by first-seen week with configurable lookback window.
Instructions
Weekly cohort retention for the product: users grouped by first-seen week (one row per cohort, newest last), with the share still active each subsequent week — a lower-triangular grid. Needs product-analytics events flowing; returns empty cohorts when the product has none. window_days default 56 = 8 weekly cohorts (min 7; roughly one extra cohort per added 7 days). product_id optional (primary product when omitted).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | No | Product id, from whoami (optional; the org's primary product when omitted). | |
| window_days | No | Lookback window in days (optional; default 56 = 8 weekly cohorts). |