[{"data":1,"prerenderedAt":311},["ShallowReactive",2],{"rule-tag-double-fire-consent":3},{"id":4,"title":5,"body":6,"breadcrumb":274,"coderail":281,"dateModified":300,"datePublished":300,"description":301,"extension":302,"meta":303,"navigation":304,"next":300,"path":305,"prev":300,"schemaType":306,"seo":307,"stem":308,"wide":309,"__hash__":310},"docs\u002Frules\u002Ftag-double-fire-consent.md","Tag fires on both page-load and custom event",{"type":7,"value":8,"toc":264},"minimark",[9,16,54,59,108,112,115,119,149,153,174,178,236,240],[10,11,12],"p",{},[13,14,15],"strong",{},"Summary",[17,18,19,30,36,42,48],"ul",{},[20,21,22,25,26],"li",{},[13,23,24],{},"rule_id"," — ",[27,28,29],"code",{},"tag-double-fire-consent",[20,31,32,35],{},[13,33,34],{},"purpose"," — Detect tags attached to both a page-load trigger and a custom event trigger",[20,37,38,41],{},[13,39,40],{},"effect"," — Tag fires twice per page: once on load, once when the event fires — double-counting data",[20,43,44,47],{},[13,45,46],{},"layer"," — container",[20,49,50,53],{},[13,51,52],{},"reversibility"," — non-destructive",[55,56,58],"h2",{"id":57},"what-fires-this","What fires this",[10,60,61,62,65,66,69,70,73,74,77,78,81,82,85,86,89,90,93,94,81,96,99,100,103,104,107],{},"The rule inspects each active tag's ",[27,63,64],{},"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 ",[27,67,68],{},"2147479553"," All Pages, ",[27,71,72],{},"2147479573"," DOM Ready, ",[27,75,76],{},"2147479574"," Window Loaded, or any trigger whose ",[27,79,80],{},"type"," is ",[27,83,84],{},"PAGEVIEW",", ",[27,87,88],{},"DOM_READY",", or ",[27,91,92],{},"WINDOW_LOADED",") AND at least one resolves to a trigger whose ",[27,95,80],{},[27,97,98],{},"CUSTOM_EVENT",". Paused tags are excluded. The rule does not evaluate the ",[27,101,102],{},"Once Per Page"," or ",[27,105,106],{},"Once Per Event"," firing option — that check is left to the remediation step.",[55,109,111],{"id":110},"why-it-matters","Why it matters",[10,113,114],{},"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\u002FB 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.",[55,116,118],{"id":117},"example","Before \u002F after",[120,121,122,140],"compare",{},[123,124,126,129,137],"compare-col",{"label":125},"Before — flagged",[10,127,128],{},"Tag \"GA4 - Page View\" has two triggers attached:",[17,130,131,134],{},[20,132,133],{},"All Pages (built-in, ID 2147479553)",[20,135,136],{},"CE - Virtual Pageview (custom event, type CUSTOM_EVENT)",[10,138,139],{},"The tag fires on every hard load and again on every SPA route change,\ncounting each route twice in GA4.",[123,141,143,146],{"label":142},"After — fixed",[10,144,145],{},"Remove All Pages. Keep only CE - Virtual Pageview.",[10,147,148],{},"If a first-hit event is required on initial load, add a DOM Ready\ntrigger scoped to that purpose and set firing option to Once Per Event.",[55,150,152],{"id":151},"remediation","Remediation",[154,155,156,159,162,165,168,171],"ol",{},[20,157,158],{},"Open the flagged tag in GTM (Google Tag Manager) and review both trigger types attached to it.",[20,160,161],{},"Decide the intended behavior: fire on every page load, or fire on the custom event only.",[20,163,164],{},"If the custom event covers all required cases, remove the page-load trigger.",[20,166,167],{},"If both triggers are genuinely needed, set the tag's advanced firing option to \"Once Per Event\" to suppress duplicate fires.",[20,169,170],{},"Preview the container and confirm the tag fires the expected number of times on a hard load and an SPA navigation.",[20,172,173],{},"Publish the updated container.",[55,175,177],{"id":176},"metadata","Metadata",[179,180,183,184,189,183,193,197,183,200,204,183,207,210,183,213,217,183,220,224,183,230,233],"dl",{"className":181},[182],"spec-list","\n  ",[185,186,188],"dt",{"id":187},"severity","Severity",[190,191,192],"dd",{},"medium",[185,194,196],{"id":195},"tier","Tier",[190,198,199],{},"optimization",[185,201,203],{"id":202},"category","Category",[190,205,206],{},"quality",[185,208,209],{"id":46},"Layer",[190,211,212],{},"container",[185,214,216],{"id":215},"version","Version",[190,218,219],{},"1",[185,221,223],{"id":222},"effort","Effort",[190,225,226,229],{},[27,227,228],{},"15min"," (about 15 minutes)",[185,231,232],{"id":52},"Reversibility",[190,234,235],{},"non-destructive",[55,237,239],{"id":238},"see-also","See also",[17,241,242,250,257],{},[20,243,244,249],{},[245,246,248],"a",{"href":247},"\u002Fcategories\u002Fquality\u002F","Quality rules"," — other rules in this category",[20,251,252,256],{},[245,253,255],{"href":254},"\u002Fhealth-score\u002F","Health score"," — how this rule contributes to the score",[20,258,259,263],{},[245,260,262],{"href":261},"\u002Frules\u002F","Rules catalog"," — browse all rules",{"title":265,"searchDepth":266,"depth":266,"links":267},"",2,[268,269,270,271,272,273],{"id":57,"depth":266,"text":58},{"id":110,"depth":266,"text":111},{"id":117,"depth":266,"text":118},{"id":151,"depth":266,"text":152},{"id":176,"depth":266,"text":177},{"id":238,"depth":266,"text":239},[275,278,280],{"label":276,"href":277},"API Reference","\u002F",{"label":279,"href":261},"Rules",{"label":29},{"cards":282,"onpage":294},[283],{"title":284,"tabs":285},"Evaluate",[286,290],{"label":287,"language":288,"code":289},"cURL","bash","curl https:\u002F\u002Fdeveloper.tagmanifest.com\u002Fv1\u002Fevaluate-rule \\\n  -H \"Authorization: Bearer $TM_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"rule_id\":\"tag-double-fire-consent\",\"url\":\"https:\u002F\u002Fexample.com\"}'\n",{"label":291,"language":292,"code":293},"MCP","text","User: Run tag-double-fire-consent on https:\u002F\u002Fexample.com\n\n# Tool call\n{\n  \"tool\": \"evaluate_rule\",\n  \"arguments\": {\n    \"rule_id\": \"tag-double-fire-consent\",\n    \"url\": \"https:\u002F\u002Fexample.com\"\n  }\n}\n",[295,296,297,298,299],{"id":57,"label":58},{"id":110,"label":111},{"id":117,"label":118},{"id":151,"label":152},{"id":176,"label":177},null,"Tag fires once on page load and again when a custom event occurs, potentially double-counting conversions.","md",{},true,"\u002Frules\u002Ftag-double-fire-consent","TechArticle",{"title":5,"description":301},"rules\u002Ftag-double-fire-consent",false,"OmsVfCpmNE_eJha5LteAQXuYIs9EXQECOUXXo_Yoc4I",1796069484327]