Resource: Trigger
Represents a Google Tag Manager Trigger
JSON representation |
---|
{ "accountId": string, "containerId": string, "triggerId": string, "name": string, "type": enum ( |
Fields | |
---|---|
accountId |
GTM Account ID. |
containerId |
GTM Container ID. |
triggerId |
The Trigger ID uniquely identifies the GTM Trigger. |
name |
Trigger display name. |
type |
Defines the data layer event that causes this trigger. |
customEventFilter[] |
Used in the case of custom event, which is fired iff all Conditions are true. |
filter[] |
The trigger will only fire iff all Conditions are true. |
autoEventFilter[] |
Used in the case of auto event tracking. |
waitForTags |
Whether or not we should delay the form submissions or link opening until all of the tags have fired (by preventing the default action and later simulating the default action). Only valid for Form Submission and Link Click triggers. |
checkValidation |
Whether or not we should only fire tags if the form submit or link click event is not cancelled by some other event handler (e.g. because of validation). Only valid for Form Submission and Link Click triggers. |
waitForTagsTimeout |
How long to wait (in milliseconds) for tags to fire when 'waits_for_tags' above evaluates to
. Only valid for Form Submission and Link Click triggers. |
uniqueTriggerId |
Globally unique id of the trigger that auto-generates this (a Form Submit, Link Click or Timer listener) if any. Used to make incompatible auto-events work together with trigger filtering based on trigger ids. This value is populated during output generation since the tags implied by triggers don't exist until then. Only valid for Form Submit, Link Click and Timer triggers. |
eventName |
Name of the GTM event that is fired. Only valid for Timer triggers. |
interval |
Time between triggering recurring Timer Events (in milliseconds). Only valid for Timer triggers. |
limit |
Limit of the number of GTM events this Timer Trigger will fire. If no limit is set, we will continue to fire GTM events until the user leaves the page. Only valid for Timer triggers. |
fingerprint |
The fingerprint of the GTM Trigger as computed at storage time. This value is recomputed whenever the trigger is modified. |
parentFolderId |
Parent folder id. |
selector |
A click trigger CSS selector (i.e. "a", "button" etc.). Only valid for AMP Click trigger. |
intervalSeconds |
Time between Timer Events to fire (in seconds). Only valid for AMP Timer trigger. |
maxTimerLengthSeconds |
Max time to fire Timer Events (in seconds). Only valid for AMP Timer trigger. |
verticalScrollPercentageList |
List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled vertically. Only valid for AMP scroll triggers. |
horizontalScrollPercentageList |
List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled horizontally. Only valid for AMP scroll triggers. |
visibilitySelector |
A visibility trigger CSS selector (i.e. "#id"). Only valid for AMP Visibility trigger. |
visiblePercentageMin |
A visibility trigger minimum percent visibility. Only valid for AMP Visibility trigger. |
visiblePercentageMax |
A visibility trigger maximum percent visibility. Only valid for AMP Visibility trigger. |
continuousTimeMinMilliseconds |
A visibility trigger minimum continuous visible time (in milliseconds). Only valid for AMP Visibility trigger. |
totalTimeMinMilliseconds |
A visibility trigger minimum total visible time (in milliseconds). Only valid for AMP Visibility trigger. |
parameter[] |
Additional parameters. |
EventType
Enums | |
---|---|
pageview |
|
domReady |
|
windowLoaded |
|
customEvent |
|
triggerGroup |
|
always |
|
formSubmission |
|
click |
|
linkClick |
|
jsError |
|
historyChange |
|
timer |
|
ampClick |
|
ampTimer |
|
ampScroll |
|
ampVisibility |
|
youTubeVideo |
|
scrollDepth |
|
elementVisibility |
Methods |
|
---|---|
|
Creates a GTM Trigger. |
|
Deletes a GTM Trigger. |
|
Gets a GTM Trigger. |
|
Lists all GTM Triggers of a Container. |
|
Updates a GTM Trigger. |