Google Analytics 4 / API Reference
ga4_cohort_analysis
GA4 analytics tool. Run a cohort retention analysis in GA4. Returns weekly retention rates for users who first visited in a given date range. Args: property_id: GA4 property ID (numeric, e.g. "123456789") cohort_date_start: Start of acquisition cohort window YYYY-MM-DD (default: 8 weeks ago) cohort_date_end: End of acquisition cohort window YYYY-MM-DD (default: 7 weeks ago) weeks: Number of retention weeks to show (1-12)
This is a read-only tool: it returns cohort analysis for your Google Analytics 4 account. It changes nothing.
Ask Claude
You do not call this tool yourself. Ask for the outcome and the client picks the tool:
Cohort analysis in my Google Analytics 4 account.
It takes 1 required and 3 optional parameters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
property_id | string | Yes | Property Id |
cohort_date_start | string | No | Cohort Date Start |
cohort_date_end | string | No | Cohort Date End |
weeks | integer | No | Weeks |
Related Google Analytics 4 tools
ga4_acquisition_channelsga4_attribution_pathsga4_audiencesga4_audit_property_settingsga4_available_metricsga4_bulk_create_key_events
Before you can call it
This tool needs a connected Google Analytics 4 account. The Google Analytics 4 connect guide covers the OAuth flow and the permissions it asks for, and the quickstart gets a client talking to the server in about five minutes.
Workflows that use this
Rather than calling tools one at a time, these skills run a whole procedure against the same account: