gtm_create_tag
Create a Google Tag Manager tag in a chosen workspace draft. Specify account, container, workspace, name, and type to define tags like GA4 events or custom HTML.
Instructions
Create a tag in an explicitly selected workspace. The container is not published.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name of the tag in GTM. | |
| type | Yes | GTM tag type id, e.g. 'gaawe' (GA4 event), 'googtag' (Google tag), 'html' (Custom HTML), or 'awct' (Google Ads Conversion Tracking). | |
| notes | No | ||
| paused | No | Whether the tag is inactive. | |
| account | Yes | Name or ID of the GTM account (e.g. 'My Company' or '1234567'). | |
| liveOnly | No | ||
| priority | No | ||
| setupTag | No | ||
| container | Yes | Name, GTM container ID (publicId, e.g. GTM-XXXX), or internal container ID. | |
| parameter | No | Parameters in the GTM API format matching the tag type. | |
| workspace | Yes | Workspace name or ID. Required for every mutating operation. | |
| teardownTag | No | ||
| scheduleEndMs | No | ||
| parentFolderId | No | ||
| consentSettings | No | ||
| firingTriggerId | No | Trigger IDs that fire this tag. | |
| scheduleStartMs | No | ||
| tagFiringOption | No | ||
| blockingTriggerId | No | Trigger IDs that block this tag. | |
| monitoringMetadata | No | ||
| monitoringMetadataTagNameKey | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No |