Resource: Tag
Represents a Google Tag Manager Tag.
JSON representation |
---|
{ "path": string, "accountId": string, "containerId": string, "workspaceId": string, "tagId": string, "name": string, "type": string, "firingRuleId": [ string ], "blockingRuleId": [ string ], "liveOnly": boolean, "priority": { object ( |
Fields | |
---|---|
path |
GTM Tag's API relative path. |
accountId |
GTM Account ID. |
containerId |
GTM Container ID. |
workspaceId |
GTM Workspace ID. |
tagId |
The Tag ID uniquely identifies the GTM Tag. |
name |
Tag display name. |
type |
GTM Tag Type. |
firingRuleId[] |
Firing rule IDs. A tag will fire when any of the listed rules are true and all of its
(if any specified) are false. |
blockingRuleId[] |
Blocking rule IDs. If any of the listed rules 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. |
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. |
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. |
tagManagerUrl |
Auto generated link to the tag manager UI |
paused |
Indicates whether the tag is paused, which prevents the tag from firing. |
monitoringMetadata |
A map of key-value pairs of tag metadata to be included in the event data for tag monitoring. Notes:
|
monitoringMetadataTagNameKey |
If non-empty, then the tag display name will be included in the monitoring metadata map using the key specified. |
consentSettings |
Consent settings of a tag. |
SetupTag
Represents a reference to atag that fires before another tag in order to set up dependencies.
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
Represents a tag that fires after another tag in order to tear down dependencies.
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 | |
---|---|
tagFiringOptionUnspecified |
|
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). |
ConsentSetting
JSON representation |
---|
{ "consentStatus": enum ( |
Fields | |
---|---|
consentStatus |
The tag's consent status. If set to NEEDED, the runtime will check that the consent types specified by the
field have been granted. |
consentType |
The type of consents to check for during tag firing if in the consent NEEDED state. This parameter must be of type
where each list item is of type
. |
ManualConsentOption
Enums | |
---|---|
notSet |
Default value where user has not specified any setting on it. |
notNeeded |
Tag doesn't require any additional consent settings. |
needed |
Tag requires additional consent settings. |
Methods |
|
---|---|
|
Creates a GTM Tag. |
|
Deletes a GTM Tag. |
|
Gets a GTM Tag. |
|
Lists all GTM Tags of a Container. |
|
Reverts changes to a GTM Tag in a GTM Workspace. |
|
Updates a GTM Tag. |