Register GA4 custom dimensions
ga_create_custom_dimensionRegister GA4 event parameters or user properties as custom dimensions so their values are retained and usable in reports before unregistered data is discarded.
Instructions
Register event parameters (or user properties) as custom dimensions so GA4 keeps their values and reports can use them (customEvent:, customUser:). GA4 discards the values of unregistered parameters and never backfills, so register them as soon as the site starts sending them. Check ga_property_config customDimensions first: a dimension cannot be deleted through the API, only archived in the GA4 UI, and a standard property allows 50 event-scoped and 25 user-scoped. Parameters already registered with the same scope are skipped, not duplicated. dryRun shows what exists and what would be created.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | List existing dimensions and the ones that would be created, without creating anything. | |
| dimensions | Yes | Dimensions to register in this property. | |
| propertyId | Yes | GA4 property ID, e.g. '123456789' (see ga_list_properties). |