ga4_create_calculated_metric
Create a GA4 calculated metric by providing property ID, unique metric ID, and formula. Confirmation required to apply the change.
Instructions
[GA4 WRITE] Create a calculated metric (calculatedMetricId is required). Requires GA4_MCP_ENABLE_WRITES=true and confirm=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Raw request-body object (JSON) merged OVER the typed fields — use for nested/advanced fields not exposed as flat args. | |
| confirm | Yes | Must be true to apply the change. | |
| formula | No | The calculation formula, e.g. "{{purchase_revenue}} / {{sessions}}". | |
| property | Yes | GA4 property ID, e.g. "123456789" or "properties/123456789". | |
| metricUnit | No | ||
| displayName | No | ||
| calculatedMetricId | Yes | The user-chosen id for the calculated metric (used in reporting). |