LW IT Solutions logo LW IT Solutions logo LW IT Solutions

GTM Container Cleanup Checker: Orphaned Tags, Triggers and Variables

Toolbox feedback

Bug, idea or suggestion

Feedback is stored on this server together with the tool page and language. No confidential data, please. Telegram receives only a notification without the feedback text.

Save tool

A container grows by adding and rarely by removing. This check reads a Google Tag Manager export in the browser and lists what is no longer connected to anything: tags without a working trigger, triggers and variables that nothing references, leftover templates and folders, and elements kept alive only by paused tags. Broken references (a trigger ID or a {{variable}} that does not exist) and duplicate IDs are listed as well, because they are the faults that make a tag silently send nothing.

In Tag Manager: Admin → Export Container, for a version or the workspace. The API format of a container version works too.

What is checked

Structure: the export format (containerVersion with lists of tags, triggers, variables, folders, built-in variables, templates, zones, clients and transformations), duplicate IDs and duplicate names.

References: firing and blocking triggers, members of trigger groups, setup and cleanup tags by name, every {{variable}} in parameters, filters and consent fields, custom template types (cvt_…) and folder IDs. Names are compared exactly, including case and spaces.

Orphans: a tag is live when it is not paused and has an existing firing trigger or is started by a live tag. Triggers, variables and templates are followed from live tags, zones, clients and transformations. What is not reached is either unused (nothing refers to it) or used only by dead elements (only paused or never-firing elements refer to it).

Order: broken references first, then unused elements, then points worth a look.

Limits and privacy

The check works on names and IDs inside the export. It cannot see a name that a script assembles as plain text, an element that another workspace still uses, or a tag that is kept on purpose. A listed element is a candidate, not a verdict: compare with the version history and the preview before deleting. Server containers are read the same way, and references from clients and transformations count as live.

The container JSON is read and analysed in the browser and is sent nowhere. Exports contain tag IDs, measurement IDs and sometimes pixel codes or keys inside custom HTML; for that reason nothing is stored or transmitted here, and the result areas are excluded from session recording.

Related

More tools for GTM containers:

Articles on keeping a container in order:

Other tools

All 145 tools

Related articles

LUKASWOJCIK.COM · NEWSLETTER

Fresh ideas in your inbox

New articles, practical tools and updates from the projects.

Choose topics (optional)
No selection: all topics.

Subscription starts after confirmation by email. · Privacy

Privacy · Newsletter

Email address, language, selected topics and subscription/confirmation dates are stored to deliver the newsletter. Double opt-in is required. Every issue includes an immediate unsubscribe link. Formconfirmed checks the signup for spam. No email open or click tracking.

Read the full privacy policy ↗