Tag fires on both page-load and custom event
Tag fires once on page load and again when a custom event occurs, potentially double-counting conversions.
Summary
- rule_id —
tag-double-fire-consent - purpose — Detect tags attached to both a page-load trigger and a custom event trigger
- effect — Tag fires twice per page: once on load, once when the event fires — double-counting data
- layer — container
- reversibility — non-destructive
What fires this
The rule inspects each active tag's firingTriggerIds array. A tag is flagged when it holds at least two trigger IDs and at least one resolves to a page-load trigger (built-in IDs 2147479553 All Pages, 2147479573 DOM Ready, 2147479574 Window Loaded, or any trigger whose type is PAGEVIEW, DOM_READY, or WINDOW_LOADED) AND at least one resolves to a trigger whose type is CUSTOM_EVENT. Paused tags are excluded. The rule does not evaluate the Once Per Page or Once Per Event firing option — that check is left to the remediation step.
Why it matters
A tag with both trigger types fires twice on a typical page visit: once when the page loads and once when the custom event fires. Conversion pixels, GA4 events, and remarketing tags all count each fire as a separate hit. Double fires inflate conversion counts, distort attribution, and make A/B test results unreliable. The issue is usually introduced when a developer adds a custom event trigger to a tag that already had All Pages attached, without removing the original.
Before / after
Tag "GA4 - Page View" has two triggers attached:
- All Pages (built-in, ID 2147479553)
- CE - Virtual Pageview (custom event, type CUSTOM_EVENT)
The tag fires on every hard load and again on every SPA route change, counting each route twice in GA4.
Remove All Pages. Keep only CE - Virtual Pageview.
If a first-hit event is required on initial load, add a DOM Ready trigger scoped to that purpose and set firing option to Once Per Event.
Remediation
- Open the flagged tag in GTM (Google Tag Manager) and review both trigger types attached to it.
- Decide the intended behavior: fire on every page load, or fire on the custom event only.
- If the custom event covers all required cases, remove the page-load trigger.
- If both triggers are genuinely needed, set the tag's advanced firing option to "Once Per Event" to suppress duplicate fires.
- Preview the container and confirm the tag fires the expected number of times on a hard load and an SPA navigation.
- Publish the updated container.
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":"tag-double-fire-consent","url":"https://example.com"}'
User: Run tag-double-fire-consent on https://example.com
# Tool call
{
"tool": "evaluate_rule",
"arguments": {
"rule_id": "tag-double-fire-consent",
"url": "https://example.com"
}
}