Google Tag Manager

App · 20 actions

Manage the tags on your website or app: add and change tags, triggers and variables, make versions and publish them, and start workflows when a version is made or published or a tag is added or changed.

Actions

ActionWhat it does
Create containerCreate a container for a website or app, with its own GTM-XXXXXXX id.
Create tagAdd a tag to a workspace, such as a Custom HTML tag or a Google tag, with the triggers that fire it.
Create triggerAdd a trigger to a workspace, such as a page view on certain pages or a custom event.
Create variableAdd a variable to a workspace, such as a Data Layer Variable tags can read.
Create versionMake a version of the container from a workspace's changes, ready to publish.
Create workspaceCreate a workspace in a container, to make changes in without touching other drafts.
Delete containerDelete a container with all its workspaces, tags and versions.
Delete tagDelete a tag from a workspace.
Get live versionGet the version that is published now: what websites using the container load.
Get tagGet one tag: its type, settings, triggers and schedule.
List accountsList the Tag Manager accounts your Google account can open.
List containersList the containers in an account: one for each website or app.
List tagsList the tags in a workspace, with their settings and triggers.
List triggersList the triggers in a workspace: the rules that decide when tags fire.
List variablesList the variables in a workspace, with their settings.
List versionsList a container's versions, newest last, with how many tags, triggers and variables each has.
List workspacesList a container's workspaces: the drafts changes are made in.
Publish versionPublish a version, so every website or app using the container gets it at once.
Update tagChange a tag: its name, settings, triggers, schedule or whether it is paused.
Update triggerRename a trigger or change its conditions.

Create container

Create a container for a website or app, with its own GTM-XXXXXXX id.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
NamenametextRequired
The container's name.
Platformusage_contexttextRequired
Where the container's tags run.One of: web, android, ios.
Website addressesdomain_nameslist
The website addresses to note on the container, such as acme.com.
Notesnotestext
Notes kept with the container in Tag Manager.

Outputs

containerobject
A container: the set of tags one website or app loads
container_idtext
The new container's id
Example output
{
  "container": {
    "account_id": "6012345678",
    "container_id": "12345678",
    "domain_names": [
      "acme.com"
    ],
    "name": "acme.com",
    "notes": "",
    "path": "accounts/6012345678/containers/12345678",
    "public_id": "GTM-ABC1234",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678",
    "usage_context": [
      "web"
    ]
  },
  "container_id": "12345678"
}

Create tag

Add a tag to a workspace, such as a Custom HTML tag or a Google tag, with the triggers that fire it. It goes live once a version with it is published.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
NamenametextRequired
The tag's name.
Tag typetag_typetext
Tag Manager's code for the tag type, such as html for Custom HTML. Leave blank for a Custom HTML tag when Custom HTML is filled in.
Custom HTMLhtmltext
For a Custom HTML tag: the HTML and script to add to the page. With this filled in, the tag type can be left blank.
Settingsparametersobject
The tag's settings. Its settings as keys and values, for example {"name": "ecommerce.value", "dataLayerVersion": 2}. Text, numbers, true/false, lists and maps are typed for Tag Manager by their value.
Firing triggersfiring_trigger_idslist
The triggers that fire the tag.
Blocking triggersblocking_trigger_idslist
Triggers that stop the tag firing.
Firestag_firing_optiontext
How often the tag fires. Defaults to once per event.One of: unlimited (Every time it is triggered), oncePerEvent (Once per event), oncePerLoad (Once per page load).
Statusstatustext
Whether the tag is active or paused. Defaults to active.One of: active, paused.
Start firing atschedule_startdate and time
Only fire from this date and time.
Stop firing atschedule_enddate and time
Stop firing after this date and time.
Notesnotestext
Notes kept with the tag in Tag Manager.

Outputs

tagobject
A tag
tag_idtext
The new tag's id
Example output
{
  "tag": {
    "account_id": "6012345678",
    "blocking_trigger_ids": [],
    "container_id": "12345678",
    "fingerprint": "1730880000123",
    "firing_trigger_ids": [
      "12"
    ],
    "name": "Checkout pixel",
    "notes": "",
    "parameters": [
      {
        "key": "html",
        "type": "template",
        "value": "<script>console.log('hi')</script>"
      }
    ],
    "path": "accounts/6012345678/containers/12345678/workspaces/7/tags/25",
    "paused": false,
    "schedule_end": "",
    "schedule_start": "",
    "tag_firing_option": "oncePerEvent",
    "tag_id": "25",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/tags/25",
    "type": "html",
    "workspace_id": "7"
  },
  "tag_id": "25"
}

Create trigger

Add a trigger to a workspace, such as a page view on certain pages or a custom event.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
NamenametextRequired
The trigger's name.
Trigger typetrigger_typetextRequired
What the trigger listens for.One of: pageview (Page view), domReady (DOM ready), windowLoaded (Window loaded), customEvent (Custom event), click (Click: all elements), linkClick (Click: just links), formSubmission (Form submission), scrollDepth (Scroll depth), elementVisibility (Element visibility), youTubeVideo (YouTube video), and 24 more.
Fire only whenconditionslist
Conditions that must all be true for the trigger to fire. Rows of variable, operator and value, such as [{"variable": "Page URL", "operator": "contains", "value": "/checkout"}]. Operators: equals, contains, startsWith, endsWith, matchRegex, greater, greaterOrEquals, less, lessOrEquals, cssSelector, urlMatches. Add "negate": true for "does not", and "ignore_case": true for a RegEx that ignores case.
Event to matchevent_conditionslist
For a custom event trigger: which event it listens for, such as [{"variable": "_event", "operator": "equals", "value": "purchase"}].
Notesnotestext
Notes kept with the trigger in Tag Manager.

Outputs

triggerobject
A trigger
trigger_idtext
The new trigger's id
Example output
{
  "trigger": {
    "account_id": "6012345678",
    "conditions": [
      {
        "parameter": [
          {
            "key": "arg0",
            "type": "template",
            "value": "{{Page URL}}"
          },
          {
            "key": "arg1",
            "type": "template",
            "value": "/checkout"
          }
        ],
        "type": "contains"
      }
    ],
    "container_id": "12345678",
    "event_conditions": [],
    "fingerprint": "1730880000123",
    "name": "Checkout pages",
    "notes": "",
    "path": "accounts/6012345678/containers/12345678/workspaces/7/triggers/12",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/triggers/12",
    "trigger_id": "12",
    "type": "pageview",
    "workspace_id": "7"
  },
  "trigger_id": "12"
}

Create variable

Add a variable to a workspace, such as a Data Layer Variable tags can read.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
NamenametextRequired
The variable's name.
Variable typevariable_typetextRequired
Tag Manager's code for the variable type, such as v for a Data Layer Variable.
Settingsparametersobject
The variable's settings. Its settings as keys and values, for example {"name": "ecommerce.value", "dataLayerVersion": 2}. Text, numbers, true/false, lists and maps are typed for Tag Manager by their value.
Notesnotestext
Notes kept with the variable in Tag Manager.

Outputs

variableobject
A variable
variable_idtext
The new variable's id
Example output
{
  "variable": {
    "account_id": "6012345678",
    "container_id": "12345678",
    "fingerprint": "1730880000123",
    "name": "Order value",
    "notes": "",
    "parameters": [
      {
        "key": "name",
        "type": "template",
        "value": "ecommerce.value"
      },
      {
        "key": "dataLayerVersion",
        "type": "integer",
        "value": "2"
      }
    ],
    "path": "accounts/6012345678/containers/12345678/workspaces/7/variables/31",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/variables/31",
    "type": "v",
    "variable_id": "31",
    "workspace_id": "7"
  },
  "variable_id": "31"
}

Create version

Make a version of the container from a workspace's changes, ready to publish. It doesn't publish: use 'Publish version' for that. The workspace is used up, as when you click Submit in Tag Manager.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
Version nameversion_nametext
A name for the version, such as what it changes.
Notesnotestext
Notes kept with the version in Tag Manager.

Outputs

new_workspace_pathtext
The workspace Tag Manager made in its place, if it made one
versionobject
A container version
version_idtext
The new version's number
Example output
{
  "new_workspace_path": "accounts/6012345678/containers/12345678/workspaces/8",
  "version": {
    "account_id": "6012345678",
    "container_id": "12345678",
    "deleted": false,
    "description": "Adds the checkout pixel.",
    "fingerprint": "1730880000999",
    "name": "Checkout pixel",
    "path": "accounts/6012345678/containers/12345678/versions/14",
    "tag_count": 9,
    "tag_manager_url": "https://tagmanager.google.com/#/versions/accounts/6012345678/containers/12345678/versions/14",
    "tag_names": [
      "Checkout pixel",
      "Google tag"
    ],
    "trigger_count": 6,
    "variable_count": 11,
    "version_id": "14"
  },
  "version_id": "14"
}

Create workspace

Create a workspace in a container, to make changes in without touching other drafts.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
NamenametextRequired
The workspace's name.
Descriptiondescriptiontext
What the workspace is for.

Outputs

workspaceobject
A workspace: a draft of changes to a container
workspace_idtext
The new workspace's id
Example output
{
  "workspace": {
    "account_id": "6012345678",
    "container_id": "12345678",
    "description": "",
    "fingerprint": "1730880000000",
    "name": "Checkout changes",
    "path": "accounts/6012345678/containers/12345678/workspaces/7",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7",
    "workspace_id": "7"
  },
  "workspace_id": "7"
}

Delete container

Delete a container with all its workspaces, tags and versions. Any website still loading it stops getting its tags.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.

Outputs

container_idtext
The container deleted
deletedtrue/false
True once it is deleted
Example output
{
  "container_id": "12345678",
  "deleted": true
}

Delete tag

Delete a tag from a workspace.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
Tagtag_idtextRequired
The tag in that workspace. Pick one, or give its id from an earlier step.

Outputs

deletedtrue/false
True once it is deleted
tag_idtext
The tag deleted
Example output
{
  "deleted": true,
  "tag_id": "25"
}

Get live version

Get the version that is published now: what websites using the container load.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.

Outputs

versionobject
A container version
Example output
{
  "version": {
    "account_id": "6012345678",
    "container_id": "12345678",
    "deleted": false,
    "description": "Adds the checkout pixel.",
    "fingerprint": "1730880000999",
    "name": "Checkout pixel",
    "path": "accounts/6012345678/containers/12345678/versions/14",
    "tag_count": 9,
    "tag_manager_url": "https://tagmanager.google.com/#/versions/accounts/6012345678/containers/12345678/versions/14",
    "tag_names": [
      "Checkout pixel",
      "Google tag"
    ],
    "trigger_count": 6,
    "variable_count": 11,
    "version_id": "14"
  }
}

Get tag

Get one tag: its type, settings, triggers and schedule.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
Tagtag_idtextRequired
The tag in that workspace. Pick one, or give its id from an earlier step.

Outputs

tagobject
A tag
Example output
{
  "tag": {
    "account_id": "6012345678",
    "blocking_trigger_ids": [],
    "container_id": "12345678",
    "fingerprint": "1730880000123",
    "firing_trigger_ids": [
      "12"
    ],
    "name": "Checkout pixel",
    "notes": "",
    "parameters": [
      {
        "key": "html",
        "type": "template",
        "value": "<script>console.log('hi')</script>"
      }
    ],
    "path": "accounts/6012345678/containers/12345678/workspaces/7/tags/25",
    "paused": false,
    "schedule_end": "",
    "schedule_start": "",
    "tag_firing_option": "oncePerEvent",
    "tag_id": "25",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/tags/25",
    "type": "html",
    "workspace_id": "7"
  }
}

List accounts

List the Tag Manager accounts your Google account can open.

Inputs

None.

Outputs

accountslist
The accounts
countnumber
How many there are
Example output
{
  "accounts": [
    {
      "account_id": "6012345678",
      "name": "Acme",
      "path": "accounts/6012345678",
      "tag_manager_url": "https://tagmanager.google.com/#/admin/accounts/6012345678"
    }
  ],
  "count": 1
}

List containers

List the containers in an account: one for each website or app.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.

Outputs

containerslist
The containers
countnumber
How many there are
Example output
{
  "containers": [
    {
      "account_id": "6012345678",
      "container_id": "12345678",
      "domain_names": [
        "acme.com"
      ],
      "name": "acme.com",
      "notes": "",
      "path": "accounts/6012345678/containers/12345678",
      "public_id": "GTM-ABC1234",
      "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678",
      "usage_context": [
        "web"
      ]
    }
  ],
  "count": 1
}

List tags

List the tags in a workspace, with their settings and triggers.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.

Outputs

countnumber
How many there are
tagslist
The tags
Example output
{
  "count": 1,
  "tags": [
    {
      "account_id": "6012345678",
      "blocking_trigger_ids": [],
      "container_id": "12345678",
      "fingerprint": "1730880000123",
      "firing_trigger_ids": [
        "12"
      ],
      "name": "Checkout pixel",
      "notes": "",
      "parameters": [
        {
          "key": "html",
          "type": "template",
          "value": "<script>console.log('hi')</script>"
        }
      ],
      "path": "accounts/6012345678/containers/12345678/workspaces/7/tags/25",
      "paused": false,
      "schedule_end": "",
      "schedule_start": "",
      "tag_firing_option": "oncePerEvent",
      "tag_id": "25",
      "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/tags/25",
      "type": "html",
      "workspace_id": "7"
    }
  ]
}

List triggers

List the triggers in a workspace: the rules that decide when tags fire.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.

Outputs

countnumber
How many there are
triggerslist
The triggers
Example output
{
  "count": 1,
  "triggers": [
    {
      "account_id": "6012345678",
      "conditions": [
        {
          "parameter": [
            {
              "key": "arg0",
              "type": "template",
              "value": "{{Page URL}}"
            },
            {
              "key": "arg1",
              "type": "template",
              "value": "/checkout"
            }
          ],
          "type": "contains"
        }
      ],
      "container_id": "12345678",
      "event_conditions": [],
      "fingerprint": "1730880000123",
      "name": "Checkout pages",
      "notes": "",
      "path": "accounts/6012345678/containers/12345678/workspaces/7/triggers/12",
      "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/triggers/12",
      "trigger_id": "12",
      "type": "pageview",
      "workspace_id": "7"
    }
  ]
}

List variables

List the variables in a workspace, with their settings.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.

Outputs

countnumber
How many there are
variableslist
The variables
Example output
{
  "count": 1,
  "variables": [
    {
      "account_id": "6012345678",
      "container_id": "12345678",
      "fingerprint": "1730880000123",
      "name": "Order value",
      "notes": "",
      "parameters": [
        {
          "key": "name",
          "type": "template",
          "value": "ecommerce.value"
        },
        {
          "key": "dataLayerVersion",
          "type": "integer",
          "value": "2"
        }
      ],
      "path": "accounts/6012345678/containers/12345678/workspaces/7/variables/31",
      "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/variables/31",
      "type": "v",
      "variable_id": "31",
      "workspace_id": "7"
    }
  ]
}

List versions

List a container's versions, newest last, with how many tags, triggers and variables each has.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Include deleted versionsinclude_deletedtrue/false
Also list versions that were deleted.

Outputs

countnumber
How many there are
versionslist
The versions
Example output
{
  "count": 1,
  "versions": [
    {
      "account_id": "6012345678",
      "container_id": "12345678",
      "deleted": false,
      "name": "Checkout pixel",
      "path": "accounts/6012345678/containers/12345678/versions/14",
      "tag_count": 9,
      "trigger_count": 6,
      "variable_count": 11,
      "version_id": "14"
    }
  ]
}

List workspaces

List a container's workspaces: the drafts changes are made in.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.

Outputs

countnumber
How many there are
workspaceslist
The workspaces
Example output
{
  "count": 1,
  "workspaces": [
    {
      "account_id": "6012345678",
      "container_id": "12345678",
      "description": "",
      "fingerprint": "1730880000000",
      "name": "Checkout changes",
      "path": "accounts/6012345678/containers/12345678/workspaces/7",
      "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7",
      "workspace_id": "7"
    }
  ]
}

Publish version

Publish a version, so every website or app using the container gets it at once. Publishing an earlier version rolls back to it.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Versionversion_idtextRequired
The version to publish. Pick one, or give its number from 'Create version'.

Outputs

publishedtrue/false
True once it is published
versionobject
A container version
Example output
{
  "published": true,
  "version": {
    "account_id": "6012345678",
    "container_id": "12345678",
    "deleted": false,
    "description": "Adds the checkout pixel.",
    "fingerprint": "1730880000999",
    "name": "Checkout pixel",
    "path": "accounts/6012345678/containers/12345678/versions/14",
    "tag_count": 9,
    "tag_manager_url": "https://tagmanager.google.com/#/versions/accounts/6012345678/containers/12345678/versions/14",
    "tag_names": [
      "Checkout pixel",
      "Google tag"
    ],
    "trigger_count": 6,
    "variable_count": 11,
    "version_id": "14"
  }
}

Update tag

Change a tag: its name, settings, triggers, schedule or whether it is paused. Only the fields filled in change.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
Tagtag_idtextRequired
The tag in that workspace. Pick one, or give its id from an earlier step.
Namenametext
A new name for the tag. Leave blank to keep it.
Custom HTMLhtmltext
For a Custom HTML tag: the HTML and script to add to the page. Leave blank to keep it as it is.
Settingsparametersobject
The tag's settings. Its settings as keys and values, for example {"name": "ecommerce.value", "dataLayerVersion": 2}. Text, numbers, true/false, lists and maps are typed for Tag Manager by their value. Only the keys given change; the others are kept.
Firing triggersfiring_trigger_idslist
The triggers that fire the tag. Replaces the current ones.
Blocking triggersblocking_trigger_idslist
Triggers that stop the tag firing. Replaces the current ones.
Firestag_firing_optiontext
How often the tag fires. Leave blank to keep it as it is.One of: unlimited (Every time it is triggered), oncePerEvent (Once per event), oncePerLoad (Once per page load).
Statusstatustext
Whether the tag is active or paused. Leave blank to keep it as it is.One of: active, paused.
Start firing atschedule_startdate and time
Only fire from this date and time. Leave blank to keep it as it is.
Stop firing atschedule_enddate and time
Stop firing after this date and time. Leave blank to keep it as it is.
Notesnotestext
Notes kept with the tag in Tag Manager.

Outputs

tagobject
A tag
Example output
{
  "tag": {
    "account_id": "6012345678",
    "blocking_trigger_ids": [],
    "container_id": "12345678",
    "fingerprint": "1730880000123",
    "firing_trigger_ids": [
      "12"
    ],
    "name": "Checkout pixel",
    "notes": "",
    "parameters": [
      {
        "key": "html",
        "type": "template",
        "value": "<script>console.log('hi')</script>"
      }
    ],
    "path": "accounts/6012345678/containers/12345678/workspaces/7/tags/25",
    "paused": false,
    "schedule_end": "",
    "schedule_start": "",
    "tag_firing_option": "oncePerEvent",
    "tag_id": "25",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/tags/25",
    "type": "html",
    "workspace_id": "7"
  }
}

Update trigger

Rename a trigger or change its conditions. Only the fields filled in change.

Inputs

Accountaccount_idtextRequired
The Tag Manager account. Pick one, or give its id.
Containercontainer_idtextRequired
The container in that account. Pick one, or give its id.
Workspaceworkspace_idtextRequired
The workspace in that container: the draft the change goes into. Pick one, such as Default Workspace, or give its id.
Triggertrigger_idtextRequired
The trigger in that workspace. Pick one, or give its id from an earlier step.
Namenametext
A new name for the trigger. Leave blank to keep it.
Fire only whenconditionslist
Conditions that must all be true for the trigger to fire. Rows of variable, operator and value, such as [{"variable": "Page URL", "operator": "contains", "value": "/checkout"}]. Operators: equals, contains, startsWith, endsWith, matchRegex, greater, greaterOrEquals, less, lessOrEquals, cssSelector, urlMatches. Add "negate": true for "does not", and "ignore_case": true for a RegEx that ignores case. Replaces the current ones; leave blank to keep them.
Event to matchevent_conditionslist
For a custom event trigger: which event it listens for, such as [{"variable": "_event", "operator": "equals", "value": "purchase"}]. Replaces the current ones; leave blank to keep them.
Notesnotestext
Notes kept with the trigger in Tag Manager.

Outputs

triggerobject
A trigger
Example output
{
  "trigger": {
    "account_id": "6012345678",
    "conditions": [
      {
        "parameter": [
          {
            "key": "arg0",
            "type": "template",
            "value": "{{Page URL}}"
          },
          {
            "key": "arg1",
            "type": "template",
            "value": "/checkout"
          }
        ],
        "type": "contains"
      }
    ],
    "container_id": "12345678",
    "event_conditions": [],
    "fingerprint": "1730880000123",
    "name": "Checkout pages",
    "notes": "",
    "path": "accounts/6012345678/containers/12345678/workspaces/7/triggers/12",
    "tag_manager_url": "https://tagmanager.google.com/#/container/accounts/6012345678/containers/12345678/workspaces/7/triggers/12",
    "trigger_id": "12",
    "type": "pageview",
    "workspace_id": "7"
  }
}

On this page