Organization rules
Rules that flag naming inconsistencies, orphaned resources, missing folder structure, global variable pollution, and duplicate trigger configurations.
On this page 5
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.
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.
What this category covers
Organization rules fall into four areas.
Naming. Three rules cover naming: whether a container has a consistent separator convention (naming-no-convention), whether it mixes separator styles (naming-mixed-separators), and whether individual tags or triggers still carry default or placeholder names (naming-default-names). A fourth rule, variable-no-type-prefix, extends this to variables — type prefixes like DLV - or CJS - make a variable's origin legible without opening it.
Orphaned resources. Tags get deleted; their triggers and variables often don't. orphaned-triggers and 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.
Folder structure. GTM's folder system is the primary way to group related tags. tags-no-folder fires when unassigned tags accumulate past 15 active tags — the threshold where the flat list starts to obscure structure. empty-folders catches the reverse: folders left behind after their contents were moved or deleted.
Global scope. 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.
How findings are tiered
Every rule in this category is info-tier. Info findings carry a score deduction of zero and are surfaced as awareness items rather than action items.
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.
Rules in this category
Info
empty-folders— Folders containing no tags, triggers, or variablesglobal-variable-pollution— Custom HTML tags declaring multiple globals without an IIFE wrappernaming-default-names— Tags or triggers with default or placeholder namesnaming-mixed-separators— Container uses two or more different naming separator stylesnaming-no-convention— Five or more active tags lack a structured naming separatororphaned-triggers— Triggers not referenced by any tagorphaned-variables— Variables not referenced by any tag or triggertags-no-folder— Tags with no folder assignment (fires at 15+ active tags)trigger-duplicate-custom-events— Three or more custom event triggers listening for the same event namevariable-no-type-prefix— Forty percent or more of user-created variables lack standard type prefixes
Common patterns
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.
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. naming-mixed-separators fires on the deviation; naming-no-convention fires only when the majority of tags have no separator structure at all.
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. tags-no-folder fires at the threshold where structure starts to pay off.
Public scans and orphaned-variables. 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.
See also
- Health score — how findings translate to score deductions by tier
- Rules catalog — browse all rules across every category
- Dead code rules — adjacent category covering paused tags and stale resources
Examples
curl https://developer.tagmanifest.com/v1/scan-url \
-H "Authorization: Bearer $TM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","category":"organization"}'