[{"data":1,"prerenderedAt":316},["ShallowReactive",2],{"docs-\u002Fcategories\u002Forganization\u002F":3},{"id":4,"title":5,"body":6,"breadcrumb":282,"coderail":290,"dateModified":305,"datePublished":305,"description":306,"extension":307,"meta":308,"navigation":309,"next":305,"path":310,"prev":305,"schemaType":311,"seo":312,"stem":313,"wide":314,"__hash__":315},"docs\u002Fcategories\u002Forganization.md","Organization rules",{"type":7,"value":8,"toc":270},"minimark",[9,13,16,21,24,56,70,84,94,98,107,110,114,119,204,208,214,226,235,244,248],[10,11,12],"p",{},"Hygiene matters for humans, not for tag delivery. Every rule in this category targets the container's navigability and maintainability — not whether tags fire. A container that scores cleanly on every other category can still be opaque to the next person who opens it.",[10,14,15],{},"Organization findings are all info-tier. They carry no score deduction and create no functional risk. What they signal is accumulated debt: the default names, orphaned resources, and ad-hoc folder layouts that make a container harder to audit, hand off, or update with confidence.",[17,18,20],"h2",{"id":19},"what-it-covers","What this category covers",[10,22,23],{},"Organization rules fall into four areas.",[10,25,26,30,31,35,36,39,40,43,44,47,48,51,52,55],{},[27,28,29],"strong",{},"Naming."," Three rules cover naming: whether a container has a consistent separator convention (",[32,33,34],"code",{},"naming-no-convention","), whether it mixes separator styles (",[32,37,38],{},"naming-mixed-separators","), and whether individual tags or triggers still carry default or placeholder names (",[32,41,42],{},"naming-default-names","). A fourth rule, ",[32,45,46],{},"variable-no-type-prefix",", extends this to variables — type prefixes like ",[32,49,50],{},"DLV -"," or ",[32,53,54],{},"CJS -"," make a variable's origin legible without opening it.",[10,57,58,61,62,65,66,69],{},[27,59,60],{},"Orphaned resources."," Tags get deleted; their triggers and variables often don't. ",[32,63,64],{},"orphaned-triggers"," and ",[32,67,68],{},"orphaned-variables"," flag resources that exist in the container but aren't referenced by anything. Over time, orphans make it genuinely difficult to determine what's safe to delete.",[10,71,72,75,76,79,80,83],{},[27,73,74],{},"Folder structure."," GTM's folder system is the primary way to group related tags. ",[32,77,78],{},"tags-no-folder"," fires when unassigned tags accumulate past 15 active tags — the threshold where the flat list starts to obscure structure. ",[32,81,82],{},"empty-folders"," catches the reverse: folders left behind after their contents were moved or deleted.",[10,85,86,89,90,93],{},[27,87,88],{},"Global scope."," ",[32,91,92],{},"global-variable-pollution"," fires when a custom HTML tag declares three or more globals without an IIFE wrapper. Naked globals can conflict with site code or with other tags — and the conflicts are difficult to reproduce and debug.",[17,95,97],{"id":96},"tiering","How findings are tiered",[10,99,100,101,106],{},"Every rule in this category is info-tier. Info findings carry a ",[102,103,105],"a",{"href":104},"\u002Fhealth-score\u002F","score deduction of zero"," and are surfaced as awareness items rather than action items.",[10,108,109],{},"That said, a container with ten organization findings is harder to maintain than one with none. The findings represent choices that compound: a container with no naming convention, no folder structure, and thirty orphaned triggers is a container that requires an investigator rather than an editor. The score doesn't penalize that — but the report flags it clearly.",[17,111,113],{"id":112},"rules","Rules in this category",[115,116,118],"h3",{"id":117},"info","Info",[120,121,122,131,139,147,155,163,171,179,187,196],"ul",{},[123,124,125,130],"li",{},[102,126,128],{"href":127},"\u002Frules\u002Fempty-folders\u002F",[32,129,82],{}," — Folders containing no tags, triggers, or variables",[123,132,133,138],{},[102,134,136],{"href":135},"\u002Frules\u002Fglobal-variable-pollution\u002F",[32,137,92],{}," — Custom HTML tags declaring multiple globals without an IIFE wrapper",[123,140,141,146],{},[102,142,144],{"href":143},"\u002Frules\u002Fnaming-default-names\u002F",[32,145,42],{}," — Tags or triggers with default or placeholder names",[123,148,149,154],{},[102,150,152],{"href":151},"\u002Frules\u002Fnaming-mixed-separators\u002F",[32,153,38],{}," — Container uses two or more different naming separator styles",[123,156,157,162],{},[102,158,160],{"href":159},"\u002Frules\u002Fnaming-no-convention\u002F",[32,161,34],{}," — Five or more active tags lack a structured naming separator",[123,164,165,170],{},[102,166,168],{"href":167},"\u002Frules\u002Forphaned-triggers\u002F",[32,169,64],{}," — Triggers not referenced by any tag",[123,172,173,178],{},[102,174,176],{"href":175},"\u002Frules\u002Forphaned-variables\u002F",[32,177,68],{}," — Variables not referenced by any tag or trigger",[123,180,181,186],{},[102,182,184],{"href":183},"\u002Frules\u002Ftags-no-folder\u002F",[32,185,78],{}," — Tags with no folder assignment (fires at 15+ active tags)",[123,188,189,195],{},[102,190,192],{"href":191},"\u002Frules\u002Ftrigger-duplicate-custom-events\u002F",[32,193,194],{},"trigger-duplicate-custom-events"," — Three or more custom event triggers listening for the same event name",[123,197,198,203],{},[102,199,201],{"href":200},"\u002Frules\u002Fvariable-no-type-prefix\u002F",[32,202,46],{}," — Forty percent or more of user-created variables lack standard type prefixes",[17,205,207],{"id":206},"patterns","Common patterns",[10,209,210,213],{},[27,211,212],{},"Orphans accumulate gradually."," A trigger is purpose-built for a specific tag. The tag gets replaced or removed; the trigger stays. This happens enough times that a container built over two or three years can easily carry a dozen unused triggers. Each one is individually harmless. Collectively they make it harder to tell what the container actually does.",[10,215,216,219,220,222,223,225],{},[27,217,218],{},"Naming conventions drift rather than collapse."," Most containers start with a consistent style. Then a tag gets copied under pressure, a new contributor doesn't know the convention, or a platform migration brings in externally named resources. The result is a container where 80% of tags follow one pattern and 20% don't. ",[32,221,38],{}," fires on the deviation; ",[32,224,34],{}," fires only when the majority of tags have no separator structure at all.",[10,227,228,231,232,234],{},[27,229,230],{},"Folder structure is often added late."," Small containers don't need folders. Once a container crosses twenty or thirty tags, the absence of folders becomes a maintenance problem. Tags for GA4 events, ad pixels, consent logic, and custom HTML scripts all live at the same level. ",[32,233,78],{}," fires at the threshold where structure starts to pay off.",[10,236,237,243],{},[27,238,239,240,242],{},"Public scans and ",[32,241,68],{},"."," When scanning from the public endpoint, the audit cannot reliably trace variable references across tags and triggers. If all variables appear unreferenced, the rule emits a different finding — noting the scan limitation rather than listing every variable as an orphan. JSON export scans produce accurate results.",[17,245,247],{"id":246},"see-also","See also",[120,249,250,256,263],{},[123,251,252,255],{},[102,253,254],{"href":104},"Health score"," — how findings translate to score deductions by tier",[123,257,258,262],{},[102,259,261],{"href":260},"\u002Frules\u002F","Rules catalog"," — browse all rules across every category",[123,264,265,269],{},[102,266,268],{"href":267},"\u002Fcategories\u002Fdead-code\u002F","Dead code rules"," — adjacent category covering paused tags and stale resources",{"title":271,"searchDepth":272,"depth":272,"links":273},"",2,[274,275,276,280,281],{"id":19,"depth":272,"text":20},{"id":96,"depth":272,"text":97},{"id":112,"depth":272,"text":113,"children":277},[278],{"id":117,"depth":279,"text":118},3,{"id":206,"depth":272,"text":207},{"id":246,"depth":272,"text":247},[283,286,288],{"label":284,"href":285},"API Reference","\u002F",{"label":287},"Categories",{"label":289},"Organization",{"cards":291,"onpage":299},[292],{"title":293,"tabs":294},"Filter to this category",[295],{"label":296,"language":297,"code":298},"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\":\"organization\"}'\n",[300,301,302,303,304],{"id":19,"label":20},{"id":96,"label":97},{"id":112,"label":113},{"id":206,"label":207},{"id":246,"label":247},null,"Rules that flag naming inconsistencies, orphaned resources, missing folder structure, global variable pollution, and duplicate trigger configurations.","md",{},true,"\u002Fcategories\u002Forganization","TechArticle",{"title":5,"description":306},"categories\u002Forganization",false,"HguEvAePeiu-AaM7rfRxVaLqfwIT8nLDxfPKihIt988",1796069484643]