growsurf_get_campaign_activation_analytics
Fetch campaign activation metrics by cohort to track referral funnel stages over 7- or 30-day windows, identifying where participants drop off.
Instructions
Fetch strict activation for eligible participants in one enrollment cohort. Referral programs group by enrolledAsAdvocateAt; affiliate programs group by approvedAsAffiliateAt. The ordered stages are ELIGIBLE, PORTAL_VIEWED, SHARE_ACTION, UNIQUE_REFERRAL_VISIT, LEAD, and CREDITED_REFERRAL. Each participant gets the selected 7- or 30-day observation window. Omit both cohort bounds for the latest fully matured cohort. Read coverageStartAt, state, and reason before interpreting a null or zero; unavailable history does not mean an action never happened. Targets campaignId if passed, otherwise GROWSURF_CAMPAIGN_ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cohortTo | No | Exclusive eligibility-cohort end, Unix timestamp in ms. Must be greater than `cohortFrom`. | |
| timezone | No | IANA timezone used to advance cohort boundaries. Defaults to `UTC`. | |
| campaignId | No | Target program (campaign) id for this call. Defaults to GROWSURF_CAMPAIGN_ID when omitted. Pass the `id` returned by growsurf_create_campaign to configure or operate a program you just created, without restarting the server. | |
| cohortFrom | No | Inclusive eligibility-cohort start, Unix timestamp in ms. Use with `cohortTo`. | |
| cohortInterval | No | Bucket size for `cohorts`. Defaults to `day`. | |
| observationWindowDays | No | Days after eligibility in which stages can count. Defaults to `30`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cohorts | No | Selected range split into exact half-open eligibility-cohort buckets. | |
| timezone | No | IANA timezone used to advance cohort boundaries. | |
| aggregate | No | Strict activation metrics for one exact enrollment cohort. | |
| programType | No | Program eligibility model. | |
| cohortInterval | No | Bucket size for `cohorts`. | |
| coverageStartAt | No | Earliest expected complete activation capture time (Unix ms), or `null` until coverage begins. | |
| portalViewedLabel | No | Program-specific display label for the stable `PORTAL_VIEWED` stage. | |
| metricContractVersion | No | Shared activation and engagement metric version. | |
| observationWindowDays | No | Days after eligibility in which stages count. | |
| portalViewedHelperText | No | Display definition for a qualifying signed-in portal view. |