Create Trigger
create_triggerCreate a GTM trigger in a workspace with name and type (e.g., pageview, click) using account, container, and workspace IDs. Optionally add conditions to control when it fires.
Instructions
Create a trigger in a workspace.
Trigger types are Tag Manager's internal codes: "pageview", "domReady", "windowLoaded", "click", "linkClick", "formSubmission", "customEvent", "timer" and so on. Copy the shape from an existing trigger via get_trigger when unsure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trigger | Yes | Trigger resource. Requires name and type, e.g. {"name": "All Pages", "type": "pageview"}, or with a condition: {"name": "Checkout page", "type": "pageview", "filter": [{"type": "contains", "parameter": [ {"type": "template", "key": "arg0", "value": "{{Page Path}}"}, {"type": "template", "key": "arg1", "value": "/checkout"}]}]}. | |
| account_id | Yes | Numeric Tag Manager account ID. | |
| container_id | Yes | Numeric container ID. | |
| workspace_id | Yes | Numeric workspace ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||