gtm_enable_built_in_variables
Enable GTM built-in variables by type to fix click and form triggers that otherwise fail to capture data. Specify variable types like pageUrl, clickElement, or formId to activate.
Instructions
Turn on GTM built-in variables.
Built-in variables are enabled by type, not created. Common types: pageUrl, pageHostname, pagePath, referrer, event, clickElement, clickClasses, clickId, clickTarget, clickUrl, clickText, formElement, formClasses, formId, formTarget, formUrl, formText, scrollDepthThreshold, videoStatus, containerId, environmentName.
Click and form triggers silently fail to capture anything useful when the matching built-in variables are off, so this is usually step one.
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": {
"variable_types": "<variable_types>"
},
"name": "gtm_enable_built_in_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| account_id | No | ||
| container_id | No | ||
| workspace_id | No | ||
| variable_types | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |