create_custom_metric
Create a custom metric in Google Analytics 4 by defining its parameter name, display name, measurement unit, and scope. Optionally include a description.
Instructions
Create a custom metric. measurement_unit is one of STANDARD, CURRENCY, FEET, METERS, KILOMETERS, MILES, MILLISECONDS, SECONDS, MINUTES, HOURS.
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": {
"property_id": "<property_id>",
"parameter_name": "<parameter_name>",
"display_name": "<display_name>"
},
"name": "create_custom_metric"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | EVENT | |
| description | No | ||
| property_id | Yes | ||
| display_name | Yes | ||
| parameter_name | Yes | ||
| measurement_unit | No | STANDARD |