ga4_run_report
Run a GA4 report with custom dimensions, metrics, date ranges, filters, and ordering. Specify dimensions, metrics, date range, and optional dimension filter to retrieve targeted analytics data.
Instructions
Run a GA4 report (Analytics Data API runReport) with arbitrary dimensions, metrics, a date range, an optional dimension filter, and ordering. The workhorse GA4 tool. Dates accept ISO (YYYY-MM-DD) or GA4 relatives like '28daysAgo' and 'today'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Convenience alias: derives end='today', start='Ndaysago'. Ignored when start_date is set explicitly. | |
| limit | No | Alias for row_limit. row_limit wins when both are set. | |
| metrics | No | GA4 metric API names. Defaults to ["sessions"]. | |
| end_date | No | ISO date or 'today'. Defaults to today. | |
| order_by | No | Optional ordering: {"metric": "sessions", "desc": true} or {"dimension": "date", "desc": false}. | |
| row_limit | No | Defaults to 1000. | |
| dimensions | No | GA4 dimension API names. Defaults to ["date"]. | |
| start_date | No | ISO date or GA4 relative. Defaults to 28daysAgo. Wins over `days` when both are set. | |
| property_id | No | GA4 property ('properties/123' or '123'). Defaults to the configured property. | |
| dimension_filter | No | Optional filter. Simple form: {"field": "sessionDefaultChannelGroup", "value": "Organic Search", "match_type": "EXACT"} or {"field": ..., "in_list": [...]}. |