Custom event trigger with no filter conditions
Custom event triggers fire for every instance of the event regardless of context, catching unintended events.
Summary
- rule_id —
trigger-broad-custom-event - purpose — Detect custom event triggers with no filter conditions that fire on every matching event regardless of context
- effect — Tags on unfiltered triggers receive data from unrelated event contexts
- layer — container
- reversibility — non-destructive
What fires this
The rule checks all triggers where type === 'CUSTOM_EVENT' and filter is absent or empty. CMP consent events are excluded. Triggers whose customEvent values match known consent management patterns — OneTrustGroupsUpdated, gtm_consent_update, cookie_consent_update, cookiebot*, uc_*, didomi_*, consent_initialized, consent_update, consent_granted, consent_denied — are not flagged. These events are inherently scoped by the CMP and do not benefit from additional filter conditions. All other unfiltered custom event triggers are flagged.
Why it matters
A custom event trigger with no filter conditions fires every time its event name appears in the dataLayer, on any page and under any context. When multiple user actions push the same event name — for example, a generic form_submit event from contact forms, demo request forms, and newsletter signups — every tag on that trigger fires for every form type. Adding a filter condition that checks a dataLayer variable such as form_type scopes the trigger to the intended context. Without filters, conversion tags receive submissions they were never meant to track.
Before / after
Trigger "CE - Form Submit" listens for form_submit with no filter conditions.
It fires on every form on the site: contact, demo request, and newsletter.
The demo request conversion tag receives all three.
Trigger "CE - Form Submit - Demo" adds a filter condition:
{{DLV - form_type}} equals demo_request.
The conversion tag fires only on demo request submissions.
Remediation
- Open each flagged trigger and identify every tag it fires.
- Examine the dataLayer push that produces the custom event. Note what additional context is available:
form_type,form_id, page path, product category. - Decide whether the trigger is intentionally broad — the tag should fire for all occurrences — or whether a narrower scope is needed.
- If narrower scope is needed: add filter conditions to the trigger. Example: Event equals
form_submitAND{{DLV - form_type}}equalsdemo_request. - If the trigger is genuinely broad by design: leave it and document the intent in the trigger description field.
- Test in GTM Preview. Push the event from each context and confirm only the intended tags fire.
Metadata
- Severity
- medium
- Tier
- optimization
- Category
- quality
- Layer
- container
- Version
- 1
- Effort
15min(about 15 minutes)- Reversibility
- non-destructive
See also
- Quality rules — other rules in this category
- Health score — how this rule contributes to the score
- Rules catalog — browse all rules
Examples
curl https://developer.tagmanifest.com/v1/evaluate-rule \
-H "Authorization: Bearer $TM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rule_id":"trigger-broad-custom-event","url":"https://example.com"}'
User: Run trigger-broad-custom-event on https://example.com
# Tool call
{
"tool": "evaluate_rule",
"arguments": {
"rule_id": "trigger-broad-custom-event",
"url": "https://example.com"
}
}