[{"data":1,"prerenderedAt":349},["ShallowReactive",2],{"docs-\u002Fcategories\u002Fquality\u002F":3},{"id":4,"title":5,"body":6,"breadcrumb":315,"coderail":323,"dateModified":338,"datePublished":338,"description":339,"extension":340,"meta":341,"navigation":342,"next":338,"path":343,"prev":338,"schemaType":344,"seo":345,"stem":346,"wide":347,"__hash__":348},"docs\u002Fcategories\u002Fquality.md","Data quality rules",{"type":7,"value":8,"toc":302},"minimark",[9,13,21,26,29,44,53,59,62,66,81,90,94,99,228,231,245,249,255,264,270,276,280],[10,11,12],"p",{},"Data quality rules audit configuration patterns that produce unreliable or incorrect data collection. The problem is rarely a broken tag. It is usually a trigger, variable, or sequencing decision that works under normal conditions but fails intermittently — or works consistently but collects the wrong data.",[10,14,15,16,20],{},"These findings surface structural risk. A container can pass every basic validity check and still have a broad custom event trigger catching unintended events, a lookup table returning ",[17,18,19],"code",{},"undefined"," for any input without a match, or two tags racing to push values to the dataLayer in an indeterminate order. Quality rules make that risk visible before it surfaces as a support ticket or an unexplained dip in conversion data.",[22,23,25],"h2",{"id":24},"what-it-covers","What this category covers",[10,27,28],{},"Quality findings fall into three problem classes.",[10,30,31,35,36,39,40,43],{},[32,33,34],"strong",{},"Trigger misconfiguration."," A trigger that fires 10 or more tags simultaneously creates a burst of network activity and removes any guarantee of execution order. A custom event trigger without filter conditions catches every instance of its event name across the entire site — not just the context it was built for. A regex filter using ",[17,37,38],{},".*"," or ",[17,41,42],{},".+"," matches everything and filters nothing.",[10,45,46,49,50,52],{},[32,47,48],{},"Variable architecture."," A lookup table with no default value returns ",[17,51,19],{}," for any input that does not match a defined row. Any downstream tag that reads that variable receives no value and may fail without an error. A variable referencing five or more other variables creates a chain where one misconfigured upstream variable breaks everything below it.",[10,54,55,58],{},[32,56,57],{},"Race conditions and sequencing."," Multiple custom HTML tags pushing to the dataLayer on the same trigger, with no priority ordering, execute in an indeterminate sequence. The result is intermittent failures that are hard to reproduce because they depend on browser, load conditions, and timing. Tags that depend on setup tags firing first create a similar fragility: if the ordering assumption breaks, downstream tags receive nothing.",[10,60,61],{},"The audience for quality findings is engineering teams and senior analytics practitioners. These findings are most relevant during pre-deployment audits of container changes and during investigations of intermittent tracking problems.",[22,63,65],{"id":64},"tiering","How findings are tiered",[10,67,68,69,72,73,76,77,80],{},"Nearly all quality rules land at ",[32,70,71],{},"optimization",". That tier means the issue creates structural risk rather than a definite tracking failure — but the risk is real, and the fix is worth making. One rule (",[17,74,75],{},"variable-cookie-access",") lands at ",[32,78,79],{},"info",": it flags a pattern that has a cleaner built-in alternative but causes no functional harm as configured.",[10,82,83,84,89],{},"There are no errors or warnings in this category. Tracking can appear to work correctly even when quality issues are present. See ",[85,86,88],"a",{"href":87},"\u002Fhealth-score\u002F","health score"," for how optimizations and info findings affect deductions.",[22,91,93],{"id":92},"rules","Rules in this category",[95,96,98],"h3",{"id":97},"optimizations","Optimizations",[100,101,102,112,121,130,144,153,162,171,183,192,201,210,219],"ul",{},[103,104,105,111],"li",{},[85,106,108],{"href":107},"\u002Frules\u002Ftrigger-broad-custom-event\u002F",[17,109,110],{},"trigger-broad-custom-event"," — Custom event trigger has no filter conditions and fires for every matching event, regardless of context.",[103,113,114,120],{},[85,115,117],{"href":116},"\u002Frules\u002Ftrigger-overloaded\u002F",[17,118,119],{},"trigger-overloaded"," — A single trigger fires 10 or more tags simultaneously, creating burst load and sequencing risk.",[103,122,123,129],{},[85,124,126],{"href":125},"\u002Frules\u002Ftrigger-excessive-blocking\u002F",[17,127,128],{},"trigger-excessive-blocking"," — A tag has 10 or more blocking (exception) triggers, producing a fragile configuration that is hard to debug.",[103,131,132,138,139,39,141,143],{},[85,133,135],{"href":134},"\u002Frules\u002Ftrigger-broad-regex\u002F",[17,136,137],{},"trigger-broad-regex"," — A regex filter uses a catch-all pattern such as ",[17,140,38],{},[17,142,42],{}," that matches everything and filters nothing.",[103,145,146,152],{},[85,147,149],{"href":148},"\u002Frules\u002Ftag-datalayer-race\u002F",[17,150,151],{},"tag-datalayer-race"," — Multiple custom HTML tags push to the dataLayer on the same trigger with no priority ordering.",[103,154,155,161],{},[85,156,158],{"href":157},"\u002Frules\u002Ftag-double-fire-consent\u002F",[17,159,160],{},"tag-double-fire-consent"," — A tag fires on both a page-load trigger and a custom event trigger, risking double-counted conversions.",[103,163,164,170],{},[85,165,167],{"href":166},"\u002Frules\u002Ftag-setup-chain\u002F",[17,168,169],{},"tag-setup-chain"," — Tags depend on setup tags to fire first, creating fragile sequencing that breaks if timing changes.",[103,172,173,179,180,182],{},[85,174,176],{"href":175},"\u002Frules\u002Flookup-no-default\u002F",[17,177,178],{},"lookup-no-default"," — A lookup table variable has no default value and returns ",[17,181,19],{}," for any unmatched input.",[103,184,185,191],{},[85,186,188],{"href":187},"\u002Frules\u002Fvariable-high-fanout\u002F",[17,189,190],{},"variable-high-fanout"," — A variable references five or more other variables, creating a single point of failure in the chain.",[103,193,194,200],{},[85,195,197],{"href":196},"\u002Frules\u002Fduplicate-event-listeners\u002F",[17,198,199],{},"duplicate-event-listeners"," — Multiple custom HTML tags register listeners for the same DOM events, which can cause double-firing.",[103,202,203,209],{},[85,204,206],{"href":205},"\u002Frules\u002Freplaceable-custom-html\u002F",[17,207,208],{},"replaceable-custom-html"," — A custom HTML tag implements a platform that has an official native GTM template available.",[103,211,212,218],{},[85,213,215],{"href":214},"\u002Frules\u002Fmultiple-googtag-configs\u002F",[17,216,217],{},"multiple-googtag-configs"," — Multiple Google Tag configurations share the same measurement ID prefix, risking double-counted pageviews and events.",[103,220,221,227],{},[85,222,224],{"href":223},"\u002Frules\u002Fno-analytics-platform\u002F",[17,225,226],{},"no-analytics-platform"," — No GA4, Universal Analytics, or other analytics platform tag is present in the container.",[95,229,230],{"id":79},"Info",[100,232,233],{},[103,234,235,240,241,244],{},[85,236,238],{"href":237},"\u002Frules\u002Fvariable-cookie-access\u002F",[17,239,75],{}," — A custom JavaScript variable reads ",[17,242,243],{},"document.cookie"," directly instead of using GTM's built-in cookie variable type.",[22,246,248],{"id":247},"patterns","Common patterns",[10,250,251,254],{},[32,252,253],{},"Broad triggers accumulate scope over time."," A custom event trigger is created for one specific use case and works correctly at first. Over the following months, other tags get attached to the same trigger. The filter conditions that would have limited it to the original context were never added. The result is a trigger that fires across more events and more pages than anyone intended, and the problem is invisible until someone audits the container.",[10,256,257,260,261,263],{},[32,258,259],{},"Lookup tables are built for known inputs."," A lookup table maps environment slugs to tracking IDs, or page types to event names. It works for every value the developer anticipated. Any value outside that set — a new environment, an unexpected page type, a URL parameter the developer did not know about — returns ",[17,262,19],{},". Downstream tags receive nothing and often fail silently. The fix is a single default value, but it is not added because the developer expects the lookup to always find a match.",[10,265,266,269],{},[32,267,268],{},"Race conditions appear intermittent but are structural."," Two custom HTML tags both push to the dataLayer on the same trigger with no priority ordering. On fast connections in Chrome, the first tag wins consistently and everything appears to work. On slower connections or in other browsers, the second tag wins sometimes. The tracking problem is reported as intermittent, but the structural condition that makes the race possible is always present. The finding surfaces the structure, not a specific observed failure.",[10,271,272,275],{},[32,273,274],{},"Setup tag chains make implicit assumptions explicit."," A tag depends on a setup tag to initialize a global object before it runs. That assumption holds as long as the container loads under normal conditions. If the setup tag is paused, removed, or delayed by a sequencing change elsewhere, the dependent tags receive nothing and fail. Tag sequencing in GTM makes the dependency explicit and enforces it; the setup chain pattern leaves it implicit and fragile.",[22,277,279],{"id":278},"see-also","See also",[100,281,282,288,295],{},[103,283,284,287],{},[85,285,286],{"href":87},"Health score"," — how quality findings translate to score deductions",[103,289,290,294],{},[85,291,293],{"href":292},"\u002Frules\u002F","Rules catalog"," — browse all rules across every category",[103,296,297,301],{},[85,298,300],{"href":299},"\u002Fcategories\u002Fperformance\u002F","Performance rules"," — related findings about tag load impact and script weight",{"title":303,"searchDepth":304,"depth":304,"links":305},"",2,[306,307,308,313,314],{"id":24,"depth":304,"text":25},{"id":64,"depth":304,"text":65},{"id":92,"depth":304,"text":93,"children":309},[310,312],{"id":97,"depth":311,"text":98},3,{"id":79,"depth":311,"text":230},{"id":247,"depth":304,"text":248},{"id":278,"depth":304,"text":279},[316,319,321],{"label":317,"href":318},"API Reference","\u002F",{"label":320},"Categories",{"label":322},"Data quality",{"cards":324,"onpage":332},[325],{"title":326,"tabs":327},"Filter to this category",[328],{"label":329,"language":330,"code":331},"scan_url","bash","curl https:\u002F\u002Fdeveloper.tagmanifest.com\u002Fv1\u002Fscan-url \\\n  -H \"Authorization: Bearer $TM_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"https:\u002F\u002Fexample.com\",\"category\":\"quality\"}'\n",[333,334,335,336,337],{"id":24,"label":25},{"id":64,"label":65},{"id":92,"label":93},{"id":247,"label":248},{"id":278,"label":279},null,"Checks for trigger misconfiguration, race conditions, variable chain fragility, and structural patterns that cause intermittent or incorrect data collection.","md",{},true,"\u002Fcategories\u002Fquality","TechArticle",{"title":5,"description":339},"categories\u002Fquality",false,"7zkFbCT6OltXVudCdpYDA7ynnHEoWyStm4QYxgDi5-U",1796069484647]