Analytics realtime report
run_realtime_reportRun a GA4 realtime report to see active users and events, then filter and compare recent minute windows to verify tracking fires correctly after code changes.
Instructions
Run a GA4 realtime report showing current active users and events.
Useful for checking if tracking is firing correctly after code changes: filter on the event that just shipped, or compare the last few minutes with the minutes before. Returns the dimension and metric headers and one row per dimension combination over the realtime window (the last 30 minutes unless minute_ranges says otherwise). When a filter matches nothing, insights[] lists the usual causes.
Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Admin API: https://developers.google.com/analytics/devguides/config/admin/v1
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_realtime_report"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum rows; 0 uses GA4's default. | |
| metrics | No | GA4 realtime metric API names, e.g. activeUsers, eventCount, keyEvents. Defaults to ["activeUsers"]. | |
| order_by | No | [{"field": <requested dimension or metric>, "desc": true}]. | |
| dimensions | No | GA4 realtime dimension API names, e.g. unifiedScreenName, eventName, country, deviceCategory, minutesAgo. | |
| property_id | No | GA4 property as "properties/123456789" (see get_account_summaries). If empty, uses the default from config. | |
| metric_filter | No | Same format as in run_ga4_report. | |
| minute_ranges | No | Up to two windows, e.g. [{"start_minutes_ago": 4, "end_minutes_ago": 0, "name": "last_5"}, {"start_minutes_ago": 29, "end_minutes_ago": 5, "name": "before"}]. start_minutes_ago is at most 29 on standard properties (59 on 360). With two windows rows carry a dateRange value with the window's name. | |
| dimension_filter | No | Same format as in run_ga4_report, e.g. [{"field": "eventName", "value": "purchase"}]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||