Run a GA4 report
run_ga4_reportRuns raw GA4 Data API reports with custom dimensions, metrics, filters, and sorting to answer analytics questions other tools do not cover.
Instructions
Any GA4 question the other tools do not cover: a raw Google Analytics Data API runReport with your own dimensions, metrics, filters and order (API names, e.g. sessionDefaultChannelGroup, sessions).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"metrics": "<metrics>"
},
"name": "run_ga4_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | Site as a domain or Search Console URL, e.g. "example.com" or "sc-domain:example.com". Optional when the credentials see one site. | |
| limit | No | Rows to return, default 100, max 10000. | |
| format | No | json (default) or csv for a table you can paste into a spreadsheet. | |
| offset | No | Row offset for paging. | |
| period | No | Named date range ending on the last settled day. Default last_28_days. | |
| metrics | Yes | GA4 metric API names, e.g. sessions, totalUsers, keyEvents, engagementRate. | |
| end_date | No | End date YYYY-MM-DD. Defaults to the last settled day (Search Console lags 2 to 3 days). | |
| order_by | No | Sort field. Metrics sort descending by default. | |
| dimensions | No | GA4 dimension API names, e.g. date, country, pagePath, sessionSourceMedium. | |
| start_date | No | Start date YYYY-MM-DD. Overrides period. | |
| ga4_property | No | GA4 property ID (numbers only). Optional: found from the site's web stream when left out. | |
| metric_filter | No | GA4 FilterExpression JSON on metrics. | |
| dimension_filter | No | GA4 FilterExpression JSON, e.g. {"filter":{"fieldName":"country","stringFilter":{"value":"India"}}}. |