Duplicate custom event triggers
3+ custom event triggers listening for the same event name. Multiple triggers for the same event create maintenance confusion — changes must be replicated across all copies.
Summary
- rule_id —
trigger-duplicate-custom-events - purpose — Detect custom event triggers where 3 or more triggers listen for the same event name
- effect — Maintenance burden: any change to one trigger must be replicated across all copies
- layer — container
- reversibility — non-destructive
What fires this
The rule iterates all triggers where type === 'CUSTOM_EVENT' and groups them by event name using the customEvent array on each trigger. If any event name appears in 3 or more triggers, the rule fires. Results are sorted by trigger count, highest first. The issue payload includes the event name, total trigger count, and trigger names (up to 5 per event). Triggers are not filtered by paused state — paused triggers contribute to the count.
Why it matters
Each duplicate trigger is a separate object that must be updated independently. When firing conditions change — a new page type, a renamed event, a firing filter — every copy requires the same edit. Missed copies cause silent inconsistency: some tags fire, others do not. The more triggers share an event name, the higher the chance of drift after a container edit. Consolidating to a single trigger with filter conditions eliminates the replication requirement entirely.
Before / after
Event name ce_form_submit is referenced by 4 separate triggers:
- "CE - Form Submit (Contact)"
- "CE - Form Submit (Demo)"
- "CE - Form Submit (Newsletter)"
- "CE - Form Submit (Webinar)"
Each trigger has identical settings except for a page-path filter. All four require updates when the event name or firing window changes.
One trigger: "CE - Form Submit"
Listens for ce_form_submit. Tags that need page-level targeting use a Trigger Exception or check {{Page Path}} via a Lookup Table variable. One trigger to maintain, one place to update.
Remediation
- Open the container and filter triggers by type "Custom Event."
- Sort by event name to surface groups with 3 or more triggers.
- For each duplicate group, identify what distinguishes each trigger (page path, element, data layer condition).
- Create one consolidated trigger for the event name.
- Move distinguishing conditions into tag-level Trigger Exceptions or Lookup Table variables.
- Re-assign all affected tags to the consolidated trigger.
- Delete the redundant triggers and verify no tags reference the removed trigger IDs.
- Test in GTM Preview that tags fire correctly with the consolidated trigger.
Metadata
- Severity
- medium
- Tier
- info
- Category
- organization
- Layer
- container
- Version
- 1
- Effort
2hr(about 2 hours)- Reversibility
- non-destructive
See also
- Organization 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-duplicate-custom-events","url":"https://example.com"}'
User: Run trigger-duplicate-custom-events on https://example.com
# Tool call
{
"tool": "evaluate_rule",
"arguments": {
"rule_id": "trigger-duplicate-custom-events",
"url": "https://example.com"
}
}