5. Set Up the Trigger
Once the inputs for the Zeotap Collect Tag have been configured (see Step 3: Configure the Tag), the next step is to define when the tag should fire. This is done by setting up triggers within Google Tag Manager (GTM).
Triggers control the execution of the tag, and they determine which events on your website should result in the tag being fired.
Depending on your data collection needs, you can configure the trigger to fire for:
- All Page Views: Use GTM's built-in
All Pagestrigger if you only want to track page views. - All Events: Use a custom event trigger to capture a broader range of events, such as clicks, form submissions, or custom-defined events.
Trigger Configuration Methods
There are two methods for setting up a trigger in GTM:
Method 1: Create Trigger Separately
Follow these steps to create a trigger independently and then attach it to the Zeotap Collect Tag.
-
Navigate to the Triggers section in GTM from the left-hand menu.
-
Click New to create a new trigger.
-
Provide a descriptive name (e.g.,
Login Event Trigger). -
Click the Trigger Configuration block to open the trigger type options.
-
Under the Other category, select Custom Event as the trigger type.
-
Enter the event name, for example:
Login event -
Enable Use regex matching if your events follow a specific naming pattern.
-
Recommended regex for capturing all events except GTM system events:
^(?!gtm\.load)(?!gtm\.dom).*
-
-
Select the All Custom Events option to apply the trigger to all matching events.
-
Click Save to create the trigger.
-
Attach this trigger to the Zeotap Collect Tag in the Tag Configuration.
This setup ensures that your Zeotap Collect Tag fires for all relevant custom events on your website, excluding internal GTM events such as
gtm.loadandgtm.dom.
Method 2: Add Trigger While Creating the Tag
You can also configure the trigger directly while creating or editing the tag.
-
Navigate to the Tag Configuration section of the tag.
-
In the Triggering section, click the + button.
-
In the Choose a trigger window, click + again to create a new trigger.
-
Choose Custom Event as the trigger type.
-
Enter the event name, such as:
Login event -
Enable Use regex matching if needed and input the following pattern:
^(?!gtm\.load)(?!gtm\.dom).* -
Select the All Custom Events radio button.
-
Click Save to add the trigger to your tag configuration.
Final Notes
- The trigger setup is a critical step to ensure the Zeotap Collect Tag only fires when meaningful user interactions occur.
- Custom events offer flexibility to track a variety of interactions beyond just page views.
- The provided regex pattern excludes common system events to prevent unnecessary data collection.
Example Trigger Configuration
Event Name: Login event
Use Regex: ✓
Regex Pattern: ^(?!gtm\.load)(?!gtm\.dom).*
Trigger Type: Custom Event
Once your trigger is created and linked to the Zeotap Collect Tag, the tag will begin to send event data as configured. After setting up triggers, proceed to validate your implementation to ensure everything is working correctly.
You can refer to the official GTM documentation to learn more about triggers.