ga_get_realtime
Pack: google_analytics · Endpoint: https://gateway.pipeworx.io/google_analytics/mcp
Check live user activity in a GA4 property right now. Returns current active user count and real-time engagement metrics. Specify property ID (e.g., “123456789”).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
property_id | string | yes | GA4 property ID (numeric) |
dimensions | array | no | Realtime dimensions (e.g., [“city”, “unifiedScreenName”, “platform”]) |
items | string | no | |
metrics | array | no | Realtime metrics (e.g., [“activeUsers”, “screenPageViews”]). Defaults to [“activeUsers”]. |
items | string | no | |
limit | number | no | Maximum number of rows (default 100) |
Example call
Arguments
{
"property_id": "123456789"
}
curl
curl -X POST https://gateway.pipeworx.io/google_analytics/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"ga_get_realtime","arguments":{"property_id":"123456789"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('ga_get_realtime', {
"property_id": "123456789"
});
More examples
{
"property_id": "123456789",
"dimensions": [
"city",
"platform"
],
"metrics": [
"activeUsers",
"screenPageViews"
],
"limit": 50
}
Response shape
| Field | Type | Description |
|---|---|---|
dimensionHeaders | array | Realtime dimension headers |
metricHeaders | array | Realtime metric headers with types |
rows | array | Realtime data rows |
totalActiveUsers | string | Total active users in realtime |
rowCount | number | Number of rows returned |
error | string | Error message if connection failed |
message | string | Error details if connection failed |
Full JSON Schema
{
"type": "object",
"properties": {
"dimensionHeaders": {
"type": "array",
"description": "Realtime dimension headers",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Dimension name"
}
}
}
},
"metricHeaders": {
"type": "array",
"description": "Realtime metric headers with types",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Metric name"
},
"type": {
"type": "string",
"description": "Metric data type"
}
}
}
},
"rows": {
"type": "array",
"description": "Realtime data rows",
"items": {
"type": "object",
"properties": {
"dimensionValues": {
"type": "array",
"description": "Dimension values for this row",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Dimension value"
}
}
}
},
"metricValues": {
"type": "array",
"description": "Metric values for this row",
"items": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "Metric value"
}
}
}
}
}
}
},
"totalActiveUsers": {
"type": "string",
"description": "Total active users in realtime"
},
"rowCount": {
"type": "number",
"description": "Number of rows returned"
},
"error": {
"type": "string",
"description": "Error message if connection failed"
},
"message": {
"type": "string",
"description": "Error details if connection failed"
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"google_analytics": {
"url": "https://gateway.pipeworx.io/google_analytics/mcp"
}
}
}
See Getting Started for client-specific install steps.