gtm_template
Perform Google Tag Manager custom template operations: create, get, list, update, remove, and revert templates.
Instructions
Performs all GTM custom template operations: create, get, list, update, remove, revert. The 'list' action returns up to itemsPerPage 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. | |
| action | Yes | The GTM custom template operation to perform. Must be one of: 'create', 'get', 'list', 'update', 'remove', 'revert'. | |
| accountId | Yes | The unique ID of the GTM Account containing the custom template. | |
| templateId | No | The unique ID of the GTM custom template. Required for 'get', 'update', 'remove', and 'revert' actions. | |
| containerId | Yes | The unique ID of the GTM Container containing the custom template. | |
| fingerprint | No | The fingerprint for optimistic concurrency control. Required for 'update' and 'revert' actions. | |
| workspaceId | Yes | The unique ID of the GTM Workspace containing the custom template. | |
| 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 custom template resource, except IDs. |