Resource: Tag
Represents a Google Tag Manager Tag.
JSON representation |
---|
{ "path" : string , "accountId" : string , "containerId" : string , "workspaceId" : string , "tagId" : string , "name" : string , "type" : string , "liveOnly" : boolean , "priority" : { object ( |
path
string
GTM Tag's API relative path.
accountId
string
GTM Account ID.
containerId
string
GTM Container ID.
workspaceId
string
GTM Workspace ID.
tagId
string
The Tag ID uniquely identifies the GTM Tag.
name
string
Tag display name.
type
string
GTM Tag Type.
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.
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.
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.
tagManagerUrl
string
Auto generated link to the tag manager UI
paused
boolean
Indicates whether the tag is paused, which prevents the tag from firing.
monitoringMetadata
object (
Parameter
)
A map of key-value pairs of tag metadata to be included in the event data for tag monitoring. Notes:
- This parameter must be type
MAP
.
- Each parameter in the map are type
TEMPLATE
, however cannot contain variable references.
monitoringMetadataTagNameKey
string
If non-empty, then the tag display name will be included in the monitoring metadata map using the key specified.
consentSettings
object (
ConsentSetting
)
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. |