Study first
Review the ideas behind the questions
These notes cover how triggers and variables decide when tags fire and what values they send.
Triggers decide when tags fire
A trigger listens for an event and applies conditions. Tags need triggers before they can fire.
- Page view triggers can fire when pages load.
- Click triggers can fire when users click links or elements.
- Form triggers can fire on form submissions.
- Custom event triggers can listen for events pushed to the data layer.
Variables supply values
Variables are placeholders for values. They can be used in tags and in trigger conditions.
- Built-in variables cover common values such as page URL and click text.
- User-defined variables can handle values not covered by built-ins.
- Variables can make trigger conditions more specific.
- Data layer variables can read values pushed from the site.
Testing before publishing
Preview mode helps check whether the right tag fires on the right action before a container version is published.
- Use preview mode before publishing important tracking changes.
- Check both tags that fired and tags that did not fire.
- A trigger that is too broad can fire tags on the wrong actions.
- Publishing makes selected workspace changes live.