create_tag_manager_trigger
Create a trigger in the container draft
Description
CREATE A TRIGGER, the rule that decides when a tag fires, in the container's draft workspace. Use it when list_tag_manager_tags shows no trigger matching what a conversion needs, for example a purchase confirmation page or a dataLayer purchase event. A trigger on its own fires nothing: it has to be named in a tag's firingTriggerId, so create the trigger, then create or update the tag that uses it. Like every other write here it lands in a DRAFT and does not reach the website until a human publishes the container. type must be one of Tag Manager's own trigger types, and an unrecognised one is refused by name with the accepted list, for free, before any request. A customEvent trigger with no customEventFilter fires on EVERY dataLayer event in the container rather than the one you meant, so that is refused too. 0 credits. Needs Google Tag Manager connected.
Parameters
| Parameter | Type | Description |
|---|---|---|
containerPathrequired | string | container path accounts/<id>/containers/<id>, from list_tag_manager_containers |
gtmWorkspace | string | Tag Manager workspace id or name; defaults to the Default Workspace |
workspace | string | older name for gtmWorkspace (MCP only) |
namerequired | string | trigger name, as it appears in Tag Manager |
typerequired | string | one of Tag Manager's own trigger types, e.g. pageview, domReady, windowLoaded, customEvent, formSubmission, linkClick, click, historyChange, scrollDepth, elementVisibility, timer. An unknown one is refused by name with the full list. |
filter | object[] | Tag Manager Condition objects, each { type, parameter: [...] } |
customEventFilter | object[] | REQUIRED for a customEvent trigger, or it would fire on every dataLayer event in the container |
notes | string | internal note stored on the trigger |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/create_tag_manager_trigger.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_tag_manager_trigger","arguments":{"containerPath":"<string>","name":"<string>","type":"<string>"}}}
CLI
hermoso call create_tag_manager_trigger --json '{"containerPath":"<string>","name":"<string>","type":"<string>"}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
list_tag_manager_tagsWhat is actually firing on the siteupdate_tag_manager_tagChange a tag in the container draftcreate_tag_manager_tagInstall a tag in the container draftlist_tag_manager_containersList the Tag Manager containers shared with this profile