send_ga4_measurement_protocol_event
Send server-side analytics events to Google Analytics 4 by calling the Measurement Protocol API. Provide a client ID and event name to track user actions like purchases.
Instructions
Transmits a server-side analytics event to Google Analytics 4 via Measurement Protocol API.
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": {
"clientId": "<clientId>",
"eventName": "<eventName>"
},
"name": "send_ga4_measurement_protocol_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clientId | Yes | GA4 Client ID (e.g. '123456789.987654321') | |
| apiSecret | No | GA4 API Secret override (default read from ENV) | |
| eventName | Yes | Name of the event to track (e.g. 'purchase', 'page_view') | |
| eventParams | No | Arbitrary event parameters object | |
| measurementId | No | GA4 Measurement ID override (default read from ENV) |