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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"account_id": "<account_id>",
"container_id": "<container_id>",
"workspace_id": "<workspace_id>",
"trigger": "<trigger>"
},
"name": "create_trigger"
}
}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 | |||