gtm_create_variable
Create a user-defined variable in an explicitly selected Google Tag Manager workspace draft, specifying account, container, workspace, name, and type.
Instructions
Create a user-defined variable in an explicitly selected workspace draft.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name of the variable. | |
| type | Yes | GTM variable type, e.g. 'v' (Data Layer), 'c' (Constant), or 'jsm' (Custom JavaScript). | |
| notes | No | ||
| account | Yes | Name or ID of the GTM account (e.g. 'My Company' or '1234567'). | |
| container | Yes | Name, GTM container ID (publicId, e.g. GTM-XXXX), or internal container ID. | |
| parameter | No | ||
| workspace | Yes | Workspace name or ID. Required for every mutating operation. | |
| formatValue | No | ||
| parentFolderId | No | ||
| enablingTriggerId | No | ||
| disablingTriggerId | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No |