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 ( |
| Fields | |
|---|---|
accountId |
GTM Account ID. |
containerId |
GTM Container ID. |
tagId |
The Tag ID uniquely identifies the GTM Tag. |
name |
Tag display name. |
type |
GTM Tag Type. |
firingTriggerId[] |
Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its
(if any specified) are false. |
blockingTriggerId[] |
Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire. |
liveOnly |
If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode). |
priority |
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 |
User notes on how to apply this tag in the container. |
scheduleStartMs |
The start timestamp in milliseconds to schedule a tag. |
scheduleEndMs |
The end timestamp in milliseconds to schedule a tag. |
parameter[] |
The tag's parameters. |
fingerprint |
The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified. |
setupTag[] |
The list of setup tags. Currently we only allow one. |
teardownTag[] |
The list of teardown tags. Currently we only allow one. |
parentFolderId |
Parent folder id. |
tagFiringOption |
Option to fire this tag. |
paused |
True if the tag is paused. |
SetupTag
| JSON representation |
|---|
{ "tagName": string, "stopOnSetupFailure": boolean } |
| Fields | |
|---|---|
tagName |
The name of the setup tag. |
stopOnSetupFailure |
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 |
The name of the teardown tag. |
stopTeardownOnFailure |
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 |
|
|---|---|
|
Creates a GTM Tag. |
|
Deletes a GTM Tag. |
|
Gets a GTM Tag. |
|
Lists all GTM Tags of a Container. |
|
Updates a GTM Tag. |