Plan a GTM trigger change
gtm_plan_trigger_upsertPlan creation or update of a Google Tag Manager trigger in a non-default workspace, then apply it after user approval—no changes are written during planning.
Instructions
PLAN (nothing is written): create or update a trigger in a non-default workspace of the client's GTM container (fingerprint from gtm_get_trigger for an update). Apply with google_apply after the user agreed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trigger | Yes | The trigger as a GTM API object: name, type, parameter [{type, key, value}], filter, customEventFilter, autoEventFilter. For an update pass only the fields to change (the others are kept); output fields (path, ids, fingerprint) may be left in and must match | |
| client_id | No | Client id from clients_list. Required when several clients are registered; empty uses the only client | |
| trigger_id | No | Numeric id of the trigger to update; empty creates one | |
| fingerprint | No | Update only: the fingerprint returned by gtm_get_tag / gtm_get_trigger / gtm_get_variable (required; refused when stale) | |
| workspace_id | Yes | Numeric GTM workspace id (gtm_workspace_status lists them); never the Default Workspace for a change |