Most Google Tag Manager containers we audit have been touched by several agencies over several years. Each one added tags and none removed any. The result is a container where nobody’s quite sure what’s firing, and conversion numbers that don’t match the business.
A messy container isn’t just untidy. It slows pages down, sends data to vendors you stopped paying years ago, fires marketing tags without consent, and makes every new request take longer because nobody wants to touch anything. A cleanup is one of the most useful half-days a marketing team can fund, and it’s worth doing before the destination tag upgrade so you aren’t migrating tags nobody needs.
Start with an export and an inventory
Export the container from GTM’s Admin > Export Container, choosing the latest published version. It gives you a complete record of every tag, trigger and variable as a JSON file, and a backup before you change anything.
While you’re in Admin, check two more things:
- User Management. List everyone with access to the container and the GTM account. Former agencies and staff often still have publish rights. Remove anyone who doesn’t need them.
- Versions. The Versions tab shows who published what and when. It tells you which tags are recent work and which are archaeology.
Then check the site itself. View the page source on a few templates and search for GTM-. You’re looking for a second container snippet, often left behind by a previous agency or added by a plugin. Two containers on one page is more common than it should be, and it doubles everything.
Finally, make a simple spreadsheet: tag name, type, vendor, trigger, owner, keep or remove. You’ll fill it in as you go through the checklist.
The checklist
- Paused and unused tags. Delete tags that have been paused for months, and tags for vendors you no longer use. Universal Analytics tags are a common example: that platform stopped processing data, so those tags do nothing useful.
- Duplicate tracking. Look for the same platform installed twice, like GA4 configured in GTM and hard-coded in the theme. Duplicate page views are the most common problem we find.
- Orphan triggers and variables. Remove anything not used by a live tag.
- Custom HTML tags. Read every one. These run arbitrary code on your site, and old ones often load scripts from domains that no longer exist.
- Consent. Every marketing tag should wait for the right consent. Check triggers, not just tag settings.
- Naming. Rename everything to a consistent pattern, like
GA4 | Event | form_submit, so the next person can find their way around. - Conversions. Test each conversion end to end and compare counts with the source system, such as your CRM or store.
What to look for in each step
Duplicates
Duplicates hide in places GTM can’t show you. Check the WordPress theme files, header and footer script plugins, Site Kit by Google, WooCommerce marketing extensions and page builder custom code fields. Inside GTM, look for two GA4 configuration tags (or Google tags) with the same measurement ID, or the same vendor pixel installed once as a template and once as Custom HTML.
The quickest test is in the browser. Open developer tools, load a page, and filter the Network tab for collect. One page view should mean one GA4 request with en=page_view. Two means you have a duplicate somewhere.
Orphans
GTM tells you when a trigger or variable isn’t used by any tag. Open the Triggers list and look for entries with no tags listed. For variables, the export file is faster: search the JSON for each variable name and see if anything references it. Be careful with variables used only inside Custom HTML tags, since GTM references those as {{Variable Name}} in the code.
Custom HTML
For each Custom HTML tag, note what it loads and where from. Check whether the vendor still exists and whether you still have a contract with them. Look for tags that fire on All Pages and load third-party scripts, because those affect every visitor and every page speed score.
Many old Custom HTML tags can be replaced with official templates from the Community Template Gallery. Templates run in a sandbox with declared permissions, which makes them easier to audit than raw code.
Consent
Open each marketing tag’s Advanced Settings > Consent Settings. Google tags have built-in consent checks. Others, like Meta, LinkedIn and TikTok, need “Require additional consent for tag to fire” set, or a trigger tied to your consent platform’s events. Then test in a private window without accepting the banner. Nothing marketing-related should fire. For the full setup, see Consent Mode v2 on WordPress.
Conversions
Pick a date range and compare. If GA4 says 140 form submissions and your CRM shows 90, something is double firing or firing on the wrong thing. Common causes are triggers set to fire on every click of a submit button (including failed submissions), thank-you pages that get reloaded, and form plugins that fire both a GTM event and their own tracking.
Common findings
A common failure: LinkedIn conversions run far higher than the leads the sales team actually receives. The container turns out to hold several LinkedIn Insight tags, one left behind by each agency that has worked on the account, and more than one of them fires a conversion on the same thank-you page.
The same container often holds a Custom HTML tag loading a chat widget that was cancelled long ago, leftover Universal Analytics tags, and dozens of variables nothing uses. After cleanup, the container is much smaller, conversions line up with the CRM, and whoever works on it next has a clear starting point.
Document what’s left
Write a one-page measurement plan listing each event, what triggers it and why it exists. Keep it with the container. The next agency, or your future self, will thank you.
Inside GTM, use folders to group tags by vendor or purpose, and use the notes field on tags to record who asked for something and when. A one-line note like “Requested by paid social for spring campaign, review in Q3” saves hours later.
Decide who owns the container. One person or team should approve publishes, even if several people build in it.
Publish carefully
Make changes in a workspace, test in Preview mode, and publish with a clear version name. If something goes wrong, rolling back to the previous version takes seconds.
A few habits help:
- Do the cleanup in stages. Remove obvious dead tags first, publish, watch for a few days, then tackle consent and conversions.
- Write version descriptions that say what changed and why, not just “updates”.
- After each publish, check real-time reports in GA4 and the ad platforms for anything that stopped.
- Keep the original export somewhere safe until you’re confident nothing was lost.
What it usually takes
A small container with a few dozen tags can often be audited and cleaned in a few hours. A container with hundreds of items, several vendors and unclear ownership can take a few days, mostly spent testing and confirming with stakeholders what each tag is for. The technical removal is the fast part.
When to bring us in
If you inherited a container and can’t say with confidence what every tag does, or your conversion numbers and your CRM disagree, an outside audit is usually faster than untangling it in-house. We clean up containers, set up consent correctly and leave you with documentation as part of our analytics and ad tracking work. Get in touch if that sounds useful.