CDPGuidesSupport

Triggers

The trigger types in the Ours Privacy Tag Manager and how to narrow them with conditions.

Use this page to choose a trigger type and narrow it with conditions. A trigger decides when a tag fires. Attach one or more triggers to a tag under Firing Triggers; one trigger can be reused by many tags.

The Triggers list showing seven triggers such as Appointment form submitted, CTA link click, and Phone link click, with their event types, folders, last edited dates, and how many tags use each one.

Trigger types

Page lifecycle

  • Page View: every page load. Add a URL condition to limit it to certain pages.
  • Initialization, DOM Ready, Window Loaded: earlier or later points in the same page load.
  • History Change: the URL changes without a full reload, as in a single-page app.
  • Window Leave and Window Unload: the visitor is about to leave, or the page is closing.

Interactions

  • All Elements Click, All Links Click, All Downloads Click: a click on any element, a link, or a link to a downloadable file.
  • Form Submit: a form is submitted. Turn on Check Validation to skip submissions your site cancels, for example when client-side validation fails. All Links Click has the same option for clicks.
  • Element Visibility: a matching element comes into view.
  • Scroll Reach: the visitor reaches a vertical or horizontal depth you set.
  • User Interaction, Fullscreen, JavaScript Error, Timer.

Your code

  • Custom Event: your code pushes an event with a matching name to the data layer. Use it for anything the other types cannot see, such as forms that send data in the background.

Consent

  • Consent: First Consent, Consent: Change, Consent: Loaded, and the modal events. Use these to fire tags when a visitor accepts a category.

Each type's options are described in the trigger editor.


Conditions

Add conditions to any trigger to fire only when they all match. A condition compares a variable to a value: Page Path contains /checkout, Click Element ID equals buy-now, or a Consent: Category variable equals true. Click triggers also accept matches CSS selector and does not match CSS selector.


Next steps

  • Tags: what fires when a trigger matches.
  • Data layer: push custom events from your code.
  • Preview mode: see which triggers fired and why.
  • Recipes: complete trigger and tag setups.

How is this guide?

On this page