Create variable (🟡 write)
gtm_create_variableCreate a user-defined Google Tag Manager variable, including dataLayer, constant, or custom parameter types, with dry-run preview before applying changes.
Instructions
Create a user-defined variable. type=dataLayer (code v) needs data_layer_name (e.g. ecommerce.items);
type=constant (code c) needs value; any other GTM type code (jsm, u, k, …) takes raw parameters.
dry_run=true (default) previews only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | No | dataLayer | |
| value | No | ||
| dry_run | No | ||
| container | Yes | ||
| parameters | No | ||
| workspace_id | No | ||
| default_value | No | ||
| data_layer_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||