query_analytics
Query Google Analytics 4 data with custom dimensions, metrics, and date ranges to retrieve specific reports.
Instructions
Query Google Analytics 4 data with custom dimensions, metrics, and date ranges
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": {
"propertyId": "<propertyId>",
"startDate": "<startDate>",
"endDate": "<endDate>",
"metrics": "<metrics>"
},
"name": "query_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| propertyId | Yes | 325253028 | |
| startDate | Yes | Start date in YYYY-MM-DD format | |
| endDate | Yes | End date in YYYY-MM-DD format | |
| dimensions | No | Array of dimension names (e.g., ["country", "city"]) | |
| metrics | Yes | Array of metric names (e.g., ["sessions", "users"]) |