Creating and Managing Triggers
Guide to creating and managing triggers in the Ours Privacy Tag Manager, including conditional triggers and a list of the most popular trigger types.
Creating and Managing Triggers
Triggers define when your tags fire. While tags determine what to track, triggers control the timing and conditions. With triggers, you have a no-code way to control exactly when events are sent to Ours Privacy based on user interactions and behaviors.
How Triggers Work
Triggers follow a simple workflow:
- Create a trigger and set its conditions (e.g., "when a button is clicked" or "when the page loads")
- Connect the trigger to one or more tags when configuring your tags
- When the conditions are met, the connected tags automatically fire
- One trigger can activate multiple tags, making them reusable and efficient
This separation of "what" (tags) and "when" (triggers) gives you powerful, flexible control over your tracking.
Trigger Types
The Tag Manager provides 7 main trigger types to cover different user interactions and scenarios.
Page View Triggers
- Fire when a page loads
- Most common trigger type
- Use for: Tracking page views, loading tags on specific pages, initializing tracking on certain URLs
Click Triggers
- Fire when a user clicks an element
- Can target specific buttons, links, or elements
- Use for: Button clicks, link tracking, CTA interactions, navigation events
Custom Event / Data Layer Triggers
- Fire when custom events are added to the data layer
- Flexible for custom tracking scenarios and application-specific events
- Integration with custom code and applications
- Use for: Application events, custom user actions, advanced tracking scenarios, events from your own code
Form Submit Triggers
- Fire when a form is submitted
- Automatically detect form submissions
- Use for: Contact forms, lead generation, newsletter signups, conversion tracking
Scroll Triggers
- Fire when a user scrolls to a specific depth
- Track how far users scroll on a page
- Use for: Content engagement, scroll depth tracking, reading behavior analysis
Timer Triggers
- Fire after a specific amount of time
- Can fire once or repeatedly at intervals
- Use for: Time on page, engagement metrics, delayed actions, session duration
Window Leave Triggers
- Fire when a user is about to leave the page
- Detect exit intent
- Use for: Exit surveys, retention campaigns, abandonment tracking, last-chance offers
Using Conditions with Triggers
Most triggers can have additional conditions to give you even more control over when they fire:
- URL filtering: Only fire on specific pages or URL patterns
- Element filtering: Only fire for specific buttons or links
- Variable conditions: Use variables to filter based on user properties, page data, or custom values
- Multiple conditions: Combine conditions to create precise trigger logic
For example, a click trigger could fire only when:
- A specific button is clicked AND
- The URL contains "/checkout/" AND
- A custom variable equals a certain value
This flexibility ensures tags only fire exactly when you need them to.
Connecting Triggers to Tags
Triggers and tags work together to control your tracking:
- Create your trigger first with the conditions you need
- Connect it to tags when configuring each tag (in the tag's settings)
- Reuse triggers across multiple tags for consistent, efficient tracking
One trigger can be connected to multiple tags, so you can define common conditions once and use them everywhere. For example, a "Checkout Page View" trigger could activate multiple tags for different analytics tools.
Testing Triggers
Before publishing your triggers to production, always test them:
- Use Preview Mode: Test your triggers on your actual website before publishing
- Verify firing behavior: Ensure triggers fire at the right time and under the right conditions
- Check connected tags: Confirm that all connected tags execute correctly when the trigger fires
- View in Recent Events: Use the Recent Events dashboard to see events flowing in real-time
Testing ensures your tracking logic works correctly before it goes live to all visitors.
Next Steps
Now that you understand triggers, explore related topics:
- Tags: Learn how to create tags that use your triggers
- Variables: Use dynamic data in trigger conditions
- Publishing & Versions: Understand the publishing workflow
- Examples: See triggers in action with real-world examples
Ready to see triggers in practice? Check out the examples page for detailed implementations.
How is this guide?