REST Resource: accounts.containers.tags

Resource: Tag

Represents a Google Tag Manager Tag.

JSON representation
{
  "accountId": string,
  "containerId": string,
  "tagId": string,
  "name": string,
  "type": string,
  "firingTriggerId": [
    string
  ],
  "blockingTriggerId": [
    string
  ],
  "liveOnly": boolean,
  "priority": {
    object (Parameter)
  },
  "notes": string,
  "scheduleStartMs": string,
  "scheduleEndMs": string,
  "parameter": [
    {
      object (Parameter)
    }
  ],
  "fingerprint": string,
  "setupTag": [
    {
      object (SetupTag)
    }
  ],
  "teardownTag": [
    {
      object (TeardownTag)
    }
  ],
  "parentFolderId": string,
  "tagFiringOption": enum (TagFiringOption),
  "paused": boolean
}
Fields
accountId

string

GTM Account ID.

containerId

string

GTM Container ID.

tagId

string

The Tag ID uniquely identifies the GTM Tag.

name

string

Tag display name.

type

string

GTM Tag Type.

firingTriggerId[]

string

Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its

blockingTriggerIds

(if any specified) are false.

blockingTriggerId[]

string

Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire.

liveOnly

boolean

If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode).

priority

object (Parameter)

User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0.

notes

string

User notes on how to apply this tag in the container.

scheduleStartMs

string (int64 format)

The start timestamp in milliseconds to schedule a tag.

scheduleEndMs

string (int64 format)

The end timestamp in milliseconds to schedule a tag.

parameter[]

object (Parameter)

The tag's parameters.

fingerprint

string

The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.

setupTag[]

object (SetupTag)

The list of setup tags. Currently we only allow one.

teardownTag[]

object (TeardownTag)

The list of teardown tags. Currently we only allow one.

parentFolderId

string

Parent folder id.

tagFiringOption

enum (TagFiringOption)

Option to fire this tag.

paused

boolean

True if the tag is paused.

SetupTag

JSON representation
{
  "tagName": string,
  "stopOnSetupFailure": boolean
}
Fields
tagName

string

The name of the setup tag.

stopOnSetupFailure

boolean

If true, fire the main tag if and only if the setup tag fires successfully. If false, fire the main tag regardless of setup tag firing status.

TeardownTag

JSON representation
{
  "tagName": string,
  "stopTeardownOnFailure": boolean
}
Fields
tagName

string

The name of the teardown tag.

stopTeardownOnFailure

boolean

If true, fire the teardown tag if and only if the main tag fires successfully. If false, fire the teardown tag regardless of main tag firing status.

TagFiringOption

Enums
unlimited Tag can be fired multiple times per event.
oncePerEvent Tag can only be fired per event but can be fired multiple times per load (e.g., app load or page load).
oncePerLoad Tag can only be fired per load (e.g., app load or page load).

Methods

create

Creates a GTM Tag.

delete

Deletes a GTM Tag.

get

Gets a GTM Tag.

list

Lists all GTM Tags of a Container.

update

Updates a GTM Tag.