Show / Hide Table of Contents

Class Trigger

Represents a Google Tag Manager Trigger

Inheritance
object
Trigger
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.TagManager.v2.Data
Assembly: Google.Apis.TagManager.v2.dll
Syntax
public class Trigger : IDirectResponseSchema

Properties

AccountId

GTM Account ID.

Declaration
[JsonProperty("accountId")]
public virtual string AccountId { get; set; }
Property Value
Type Description
string

AutoEventFilter

Used in the case of auto event tracking.

Declaration
[JsonProperty("autoEventFilter")]
public virtual IList<Condition> AutoEventFilter { get; set; }
Property Value
Type Description
IList<Condition>

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.

Declaration
[JsonProperty("checkValidation")]
public virtual Parameter CheckValidation { get; set; }
Property Value
Type Description
Parameter

ContainerId

GTM Container ID.

Declaration
[JsonProperty("containerId")]
public virtual string ContainerId { get; set; }
Property Value
Type Description
string

ContinuousTimeMinMilliseconds

A visibility trigger minimum continuous visible time (in milliseconds). Only valid for AMP Visibility trigger.

Declaration
[JsonProperty("continuousTimeMinMilliseconds")]
public virtual Parameter ContinuousTimeMinMilliseconds { get; set; }
Property Value
Type Description
Parameter

CustomEventFilter

Used in the case of custom event, which is fired iff all Conditions are true.

Declaration
[JsonProperty("customEventFilter")]
public virtual IList<Condition> CustomEventFilter { get; set; }
Property Value
Type Description
IList<Condition>

ETag

The ETag of the item.

Declaration
public virtual string ETag { get; set; }
Property Value
Type Description
string

EventName

Name of the GTM event that is fired. Only valid for Timer triggers.

Declaration
[JsonProperty("eventName")]
public virtual Parameter EventName { get; set; }
Property Value
Type Description
Parameter

Filter

The trigger will only fire iff all Conditions are true.

Declaration
[JsonProperty("filter")]
public virtual IList<Condition> Filter { get; set; }
Property Value
Type Description
IList<Condition>

Fingerprint

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

Declaration
[JsonProperty("fingerprint")]
public virtual string Fingerprint { get; set; }
Property Value
Type Description
string

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.

Declaration
[JsonProperty("horizontalScrollPercentageList")]
public virtual Parameter HorizontalScrollPercentageList { get; set; }
Property Value
Type Description
Parameter

Interval

Time between triggering recurring Timer Events (in milliseconds). Only valid for Timer triggers.

Declaration
[JsonProperty("interval")]
public virtual Parameter Interval { get; set; }
Property Value
Type Description
Parameter

IntervalSeconds

Time between Timer Events to fire (in seconds). Only valid for AMP Timer trigger.

Declaration
[JsonProperty("intervalSeconds")]
public virtual Parameter IntervalSeconds { get; set; }
Property Value
Type Description
Parameter

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.

Declaration
[JsonProperty("limit")]
public virtual Parameter Limit { get; set; }
Property Value
Type Description
Parameter

MaxTimerLengthSeconds

Max time to fire Timer Events (in seconds). Only valid for AMP Timer trigger.

Declaration
[JsonProperty("maxTimerLengthSeconds")]
public virtual Parameter MaxTimerLengthSeconds { get; set; }
Property Value
Type Description
Parameter

Name

Trigger display name.

Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
Type Description
string

Notes

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

Declaration
[JsonProperty("notes")]
public virtual string Notes { get; set; }
Property Value
Type Description
string

Parameter

Additional parameters.

Declaration
[JsonProperty("parameter")]
public virtual IList<Parameter> Parameter { get; set; }
Property Value
Type Description
IList<Parameter>

ParentFolderId

Parent folder id.

Declaration
[JsonProperty("parentFolderId")]
public virtual string ParentFolderId { get; set; }
Property Value
Type Description
string

Path

GTM Trigger's API relative path.

Declaration
[JsonProperty("path")]
public virtual string Path { get; set; }
Property Value
Type Description
string

Selector

A click trigger CSS selector (i.e. "a", "button" etc.). Only valid for AMP Click trigger.

Declaration
[JsonProperty("selector")]
public virtual Parameter Selector { get; set; }
Property Value
Type Description
Parameter

TagManagerUrl

Auto generated link to the tag manager UI

Declaration
[JsonProperty("tagManagerUrl")]
public virtual string TagManagerUrl { get; set; }
Property Value
Type Description
string

TotalTimeMinMilliseconds

A visibility trigger minimum total visible time (in milliseconds). Only valid for AMP Visibility trigger.

Declaration
[JsonProperty("totalTimeMinMilliseconds")]
public virtual Parameter TotalTimeMinMilliseconds { get; set; }
Property Value
Type Description
Parameter

TriggerId

The Trigger ID uniquely identifies the GTM Trigger.

Declaration
[JsonProperty("triggerId")]
public virtual string TriggerId { get; set; }
Property Value
Type Description
string

Type

Defines the data layer event that causes this trigger.

Declaration
[JsonProperty("type")]
public virtual string Type { get; set; }
Property Value
Type Description
string

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.

Declaration
[JsonProperty("uniqueTriggerId")]
public virtual Parameter UniqueTriggerId { get; set; }
Property Value
Type Description
Parameter

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.

Declaration
[JsonProperty("verticalScrollPercentageList")]
public virtual Parameter VerticalScrollPercentageList { get; set; }
Property Value
Type Description
Parameter

VisibilitySelector

A visibility trigger CSS selector (i.e. "#id"). Only valid for AMP Visibility trigger.

Declaration
[JsonProperty("visibilitySelector")]
public virtual Parameter VisibilitySelector { get; set; }
Property Value
Type Description
Parameter

VisiblePercentageMax

A visibility trigger maximum percent visibility. Only valid for AMP Visibility trigger.

Declaration
[JsonProperty("visiblePercentageMax")]
public virtual Parameter VisiblePercentageMax { get; set; }
Property Value
Type Description
Parameter

VisiblePercentageMin

A visibility trigger minimum percent visibility. Only valid for AMP Visibility trigger.

Declaration
[JsonProperty("visiblePercentageMin")]
public virtual Parameter VisiblePercentageMin { get; set; }
Property Value
Type Description
Parameter

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.

Declaration
[JsonProperty("waitForTags")]
public virtual Parameter WaitForTags { get; set; }
Property Value
Type Description
Parameter

WaitForTagsTimeout

How long to wait (in milliseconds) for tags to fire when 'waits_for_tags' above evaluates to true. Only valid for Form Submission and Link Click triggers.

Declaration
[JsonProperty("waitForTagsTimeout")]
public virtual Parameter WaitForTagsTimeout { get; set; }
Property Value
Type Description
Parameter

WorkspaceId

GTM Workspace ID.

Declaration
[JsonProperty("workspaceId")]
public virtual string WorkspaceId { get; set; }
Property Value
Type Description
string

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX