A tag manager such as Google Tag Manager is a convenient place to add analytics, advertising pixels and other snippets without editing the website. Over a few years, agencies change, campaigns end and people leave, but their tags can stay. This article is a practical clear-out for a Google Tag Manager container: what to look for, how to record who owns what, and how to remove things without breaking anything.
Why containers fill up, and why it matters
Google's best practices for tags and tag managers notes that tags tend to accumulate, and that “auditing tags periodically is one way to reverse this trend”. It also points out that the container itself grows: triggers are code that “increase the size and execution cost of the tag manager”, and variables add code that is evaluated repeatedly.
So a clear-out can help twice: fewer tags loading extra files, and a smaller tag manager script. Whether a carbon test sees the difference depends on your consent set-up, which our article on cookie banners, tags and your carbon test explains. Housekeeping is worth doing either way, because visitors who accept still download every tag.
Make an inventory and name an owner
Before removing anything, list what is there. A simple spreadsheet works: one row per tag, with its type, its trigger, what it is for, who relies on its data and when it was last needed. The aim is that every tag has a named owner who can say “keep” or “remove”.
- Use notes. Tag Manager has supported notes on tags, triggers and variables since 2017, opened from the more actions menu. A one-line note such as “Owner: marketing; for the spring campaign” saves a lot of guessing later.
- Use folders. The bulk actions let you move tags, triggers and variables into folders, for example by team or supplier.
- Ask before assuming. A tag nobody recognises may still feed a report someone relies on. If no owner can be found after asking, it is a candidate for pausing, not instant deletion.
Tags that fire on every page
Many tags are set to fire on all pages because it is the easiest choice. Google's page view trigger help describes the option to fire on “Some Events” instead, with conditions such as a URL pattern. web.dev gives the same advice: “define specific trigger conditions to avoid firing tags when unnecessary”.
Typical examples: a booking-conversion pixel that only needs to fire on the booking confirmation page, or a heatmap tool that only needs the landing page you are testing. Narrowing the trigger keeps the tag working where it is useful and stops it everywhere else.
Old and duplicate tags
- Duplicates. web.dev notes that duplicates often happen when a tag is added directly to the page's HTML and also through the tag manager. Check your theme or site settings for analytics code before assuming the container is the only source.
- Finished campaigns and trials. Pixels for platforms you no longer advertise on, and tools from a trial that ended, are the usual suspects.
- Blocked rather than removed. web.dev advises that unused tags “should be paused or removed rather than blocked through use of a trigger exception”.
- Custom HTML tags. web.dev warns these are easy to misuse in ways that hurt performance, so give each one a clear owner and purpose.
Remove safely: pause, preview, publish
- Keep a copy. Tag Manager keeps a version history, and an earlier version can be published again. You can also export the container as a JSON file to keep on file.
- Pause first. Pausing temporarily disables a tag without deleting it. Paused or unpaused tags only take effect once you save and publish.
- Preview. Preview mode opens Tag Assistant so you can browse the site with your draft and see which tags fired; the debug view appears only in your own browser.
- Publish with a clear name. Google suggests version names and descriptions that make it easy to know what changed, for example “Paused old ad pixels, October”.
- Delete later. After a few weeks with no complaints from the owners, delete the paused tags and any triggers and variables only they used. Note that the trash can holds deleted accounts and containers for 30 days; for individual tags, the version history is your safety net.
Check the result
GreenTracer measures one initial, uncached load with Google PageSpeed Insights and doesn't accept cookie banners, so tags that wait for consent are not in the result, while the tag manager script and any tags that load straight away are. Under the Sustainable Web Design Model v4, each megabyte removed from that load lowers the estimate by about 0.148 g CO₂e per page view (about 0.121 g on a host listed as green).
Check the page again after publishing and compare with your earlier report, which keeps previous checks as history. Our guide to tracking improvements over time suggests how to record changes like this, and a calendar reminder to repeat the clear-out keeps the container tidy.
Sources
- web.dev: best practices for tags and tag managers
- Tag Manager Help: page view triggers
- Tag Manager Help: preview and debug containers
- Tag Manager Help: pause tags
- Tag Manager Help: bulk actions
- Tag Manager Help: publishing, versions and approvals
- Tag Manager Help: container export and import
- Tag Manager Help: trash can
- Tag Manager Help: release notes (notes on tags, triggers and variables)
- Sustainable Web Design: estimating digital emissions (SWDM v4)



