Create GTM Trigger
gtm_create_triggerCreate a new trigger in a Google Tag Manager workspace by specifying account, container, workspace, trigger name, type, and optional filters.
Instructions
Create a new trigger in a workspace.
Common trigger types:
PAGEVIEW: Fires on page view
CLICK: Fires on click events
LINK_CLICK: Fires on link clicks
FORM_SUBMISSION: Fires on form submit
CUSTOM_EVENT: Fires on custom dataLayer events
DOM_READY: Fires when DOM is ready
WINDOW_LOADED: Fires when window loads
ELEMENT_VISIBILITY: Fires when element becomes visible
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>",
"name": "<name>",
"type": "<type>"
},
"name": "gtm_create_trigger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the trigger | |
| type | Yes | Trigger type (PAGEVIEW, CLICK, CUSTOM_EVENT, etc.) | |
| filter | No | General filter conditions for the trigger | |
| account_id | Yes | The GTM account ID | |
| container_id | Yes | The GTM container ID | |
| workspace_id | Yes | The GTM workspace ID | |
| custom_event_filter | No | For CUSTOM_EVENT triggers, the event filter conditions |