ga4_run_report
Retrieve historical Google Analytics 4 metrics and dimensions over a chosen date range to analyze users, sessions, or page views.
Instructions
Run a Google Analytics 4 report for chosen metrics, dimensions, and an absolute or relative date range. Use when the user asks for historical GA4 numbers such as users, sessions, or page views. Call ga4_run_realtime_report for who is on the site right now, and call ga4_get_metadata before guessing a custom metric name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows to return (1-100000, default 100) | |
| metrics | Yes | Metrics to retrieve (e.g., ["activeUsers", "sessions", "screenPageViews"]) | |
| end_date | Yes | End date: YYYY-MM-DD or relative ("yesterday", "today") | |
| dimensions | No | Dimensions to group by (e.g., ["date", "country", "pagePath"]) | |
| start_date | Yes | Start date: YYYY-MM-DD or relative ("7daysAgo", "30daysAgo", "yesterday", "today") | |
| property_id | Yes | GA4 property ID (e.g., "123456" or "properties/123456") |