gtm_tag
Manage Google Tag Manager tags: create, get, list, update, remove, or revert tags using account, container, and workspace IDs.
Instructions
Performs all GTM tag operations: create, get, list, update, remove, revert. The 'list' action returns up to 20 items per page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination (starts from 1). Each page contains up to itemsPerPage items. | |
| tagId | No | The unique ID of the GTM tag. Required for 'get', 'update', 'remove', and 'revert' actions. | |
| action | Yes | The GTM tag operation to perform. Must be one of: 'create', 'get', 'list', 'update', 'remove', 'revert'. | |
| accountId | Yes | The unique ID of the GTM Account containing the tag. | |
| containerId | Yes | The unique ID of the GTM Container containing the tag. | |
| fingerprint | No | The fingerprint for optimistic concurrency control. Optional for 'update' action if included in createOrUpdateConfig. Required for 'revert' action. | |
| workspaceId | Yes | The unique ID of the GTM Workspace containing the tag. | |
| itemsPerPage | No | Number of items to return per page (1-20). Default: 20. Use lower values if experiencing response issues. | |
| createOrUpdateConfig | No | Configuration for 'create' and 'update' actions. All fields correspond to the GTM tag resource, except IDs. |