triggers_create
Create Google Tag Manager triggers for events like clicks, pageviews, or custom events with conditional filters. Requires write flag and explicit confirmation.
Instructions
[WRITE] Create a GTM trigger. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | ||
| containerId | Yes | ||
| workspaceId | Yes | ||
| name | Yes | Trigger name. | |
| type | Yes | Trigger type (e.g. "click", "pageview", "customEvent", "domReady", "windowLoaded", "historyChange", "jsError", "scrollDepth", "elementVisibility", "timer", "youTubeVideo", "formSubmission", "linkClick"). | |
| filter | No | Conditions that must be met for the trigger to fire. | |
| customEventFilter | No | Used for custom event triggers. | |
| eventName | No | Custom event name (for customEvent type). | |
| notes | No | ||
| parentFolderId | No | ||
| confirm | Yes |