Google Analytics report
ga_reportRuns a Google Analytics 4 report (read-only): metrics for a date range, optionally broken down by up to 3 dimensions, sorted by the first metric (highest first) unless order_by is given. Only the allowed dimension and metric names are accepted (the error lists them). Typical: traffic by sessionDefaultChannelGroup, revenue by sessionCampaignName, sessions by date. Numbers are as Google Analytics measured them (sampling, consent and ad blockers make them differ from the shop's own orders).
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": "ga_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| filter | No | Optional dimension filter. | |
| metrics | Yes | e.g. sessions, activeUsers, ecommercePurchases, purchaseRevenue, keyEvents. | |
| end_date | No | YYYY-MM-DD, or today / yesterday / NdaysAgo (e.g. 28daysAgo). | yesterday |
| order_by | No | A metric or dimension of this report to sort by (descending for metrics). | |
| dimensions | No | e.g. sessionDefaultChannelGroup, sessionSourceMedium, sessionCampaignName, landingPage, date, country, deviceCategory, itemName. | |
| start_date | No | YYYY-MM-DD, or today / yesterday / NdaysAgo (e.g. 28daysAgo). | 28daysAgo |
| property_id | No | GA4 property id (digits, from ga_list_properties). Optional when the account has only one property. |