

Declutter Your GTM: A Practical Guide to Cleaning Up Tags, Triggers, and Variables
Clean up your GTM setup to reduce bloat, improve tracking accuracy, and stay within limits. Learn how to declutter tags, triggers, and variables today.

Ricardo Cristofolini
Senior Implementation Specialist, Data Solutions
I’m passionate about what I do. If you meet my manager or co-workers, they would say I’m a team player, engaged and always excited to learn something new. Like everyone else I have some flaws. However I’m not afraid to work around those to bring the best in myself and for the company
A cluttered Google Tag Manager (GTM) container can become a silent liability. As your tagging setup evolves, it’s tempting to keep adding tags, triggers, and variables without regularly assessing what still serves a purpose. Over time, this unchecked growth can lead to bloated containers, increased page load times, and even broken data collection. Whether you're running a lean analytics setup or managing complex tracking across multiple platforms, routine clean-ups are essential to maintain accuracy, performance, and scalability. In this guide, we break down best practices for organizing your GTM container - and why now is the perfect time to tidy up.
Why a GTM Container Cleanup Matters
When dealing with GTM implementation, it’s easy to get lost in tags, triggers, and variables if a proper implementation process is not in place. When this work starts, it’s common to feel the desire to track everything down and know every single action a user is doing on your site/app.
However, this comes with a price, even if you have a proper Data Layer in place, which gives you the first step for best practices on GTM tracking. That’s why it’s important to clean up your GTM items as much as possible and more often than you think.
What to Focus On in Your GTM Setup: Tags, Triggers, and Variables
Some key areas to focus on when cleaning up your GTM containers are:
Removing unused tags, triggers, and/or variables
Removing outdated or irrelevant tags, ie.
Google Universal Analytics tags (sunsetted)
Time-based / Page-based campaign tags/triggers/variables that have run their course (e.g. Floodlight tags)
Outdated UI based tags, triggers and variables
Reviewing and removing duplicate elements (e.g. custom variables available as built-in)
Remove any templates not being used and make sure the ones being used are up to date
Be mindful of the naming convention
These are just a few common patterns we’ve observed across many GTM containers over the years. Your container might not require all of these actions - or it might need additional steps not covered here. The key takeaway is to prioritize organization. A well-structured container is easier to maintain, debug, and scale over time.
How Often Should You Clean Your GTM Container?
A good clean-up should always happen when something new is implemented. This will not only give you an overview of what you currently have in place, but it will also open the possibilities to new processes and updates. The same implementation done 2 years ago may not be as good as before and could use some touch-ups.
A proper GTM container clean-up isn’t just about removing outdated or unused items - it’s also about ensuring everything is well-organized and follows best practices in terms of implementation and workflow. Larger containers often get overlooked, and clean-up may be delayed indefinitely. That’s why scheduling a recurring task or dedicated time for container maintenance is a smart and sustainable approach.
Where to Start:
Create a GTM Governance Document
Start by creating a comprehensive list of everything currently in the container. This document is often referred to as a Governance document, though the name may vary depending on the company or team. Its purpose is to centralize all tag, trigger, and variable configurations, allowing for easier verification and alignment, without needing to dive into GTM itself.
Next, review the items directly within GTM. Understand what each tag does, and identify which triggers and variables are associated with it. Don’t overlook the built-in features GTM provides: you can add notes and descriptions to versions and workspaces - features that are often underused. Be sure to take advantage of them for future reference.
Organize Tags by Type for Better GTM Management
Once that foundation is in place, begin organizing your tags into categories. For example:
GA4 Event tags
UA Event tags (believe me, that is not uncommon)
Custom HTML tags
Marketing tags
The number of categories you create will depend on the contents of your container, but the goal is to group similar tags so you can assess and manage them more effectively. Start by focusing on the most critical categories - especially those that heavily impact your container, such as Custom HTML tags.
Review Custom HTML and JavaScript Tags Carefully
While Custom HTML tags offer flexibility, they’re often used to inject code snippets or push data to the Data Layer. In many cases, these actions are better handled outside of GTM (directly on the site) or through a custom template, which offers better maintainability and structure.
Remove Duplicates and Unused Elements in GTM
As you categorize your tags, associated triggers and variables will naturally surface, since they are mapped to specific tags. Any triggers or variables not linked to active tags - and not used elsewhere - can be safely removed.
NOTE: Variables and triggers can be reused across multiple tags, so be careful not to have the same trigger or variable mapped to both a deprecated Universal Analytics (UA) tag and an active GA4 tag. If that’s the case, make sure to disconnect the trigger or variable from the UA tag before removing it. In these situations, only the UA tag should be deleted - not the shared triggers or variables.
Marketing tags often present another challenge, especially campaign-based tags like Floodlight or Google Ads. These tags typically have a short lifespan - sometimes just a few weeks - but are frequently forgotten after the campaign ends. Over time, this can lead to a cluttered container with dozens or even hundreds of outdated tags.
When it comes to variables, you can apply a similar organizational strategy as with tags - grouping them into categories - but there's usually no need to go as deep. The key points to focus on are:
Custom JavaScript
Unused variables
Custom JavaScript variables are powerful because they allow you to manipulate data before it’s sent to GA4. While there’s nothing inherently wrong with using them, relying too heavily on them can bloat your container - both in terms of load time and total container size (which is capped at 200KB). They offer flexibility, but should be used with intention and restraint. When reviewing Custom JavaScript variables, consider asking yourself:
Can any of this logic be moved to the website instead?
Are any of these variables unnecessary and safe to remove?
It’s also important to evaluate your container for duplicate elements - whether tags, triggers, or variables. Once identified, review how each duplicate is being used, choose the most appropriate version to keep, and update references accordingly. After that, you can safely remove the redundant items. These could be tags, triggers, or variables.
This cleanup step helps reduce confusion, minimizes the container’s impact on page performance, and eliminates potential inconsistencies in how data is collected or triggered.
Consolidate Redundant Tags Using Dynamic Variables
Another advanced step in GTM container clean-up is consolidating similar or redundant tags. For example, let’s say that you have multiple GA4 scroll tracking tags like:
GA4 - scroll_progress - 10%
GA4 - scroll_progress - 25%
GA4 - scroll_progress - 50%
etc
Each of these tags likely captures a percent_scrolled event parameter using a hardcoded value like "10%", "25%", or "50%". Instead of managing separate tags, you can consolidate them into a single dynamic tag that uses the Data Layer or GTM’s Built-In Scroll Depth variables to populate the percent_scrolled parameter.
This approach reduces container weight and simplifies tag management. However, it’s important to note that one could argue that making tags more dynamic can also increase complexity, and in some cases, it can. That is why these changes should be carefully evaluated and not rushed - especially if development support is required.
Ultimately, the best approach depends on who manages your GTM container. In some cases, maintaining separate, static tags may be more appropriate for clarity and ease of use.
Final Thoughts: Make GTM Maintenance a Habit
A well-maintained GTM container is more than just a clean workspace—it’s a foundation for accurate data, faster debugging, and scalable marketing operations. By auditing your setup, removing redundant or outdated elements, and implementing a governance process, you not only improve performance but also set your team up for long-term success. GTM clean-up isn’t a one-time task; it’s a recurring best practice. Schedule it, document it, and treat your container like the mission-critical asset it is. Once your GTM audit is complete, don’t forget to extend the clean-up to your GA4 property to ensure your data layer and reporting remain aligned and optimized.
More Insights


Declutter Your GTM: A Practical Guide to Cleaning Up Tags, Triggers, and Variables

Ricardo Cristofolini
Senior Implementation Specialist, Data Solutions
May 21, 2025
Read More


Is Your Website Violating California Invasion of Privacy Act (CIPA) ?

Rob English
Lead Implementation Specialist
May 14, 2025
Read More


Ready for What? AI Readiness in Marketing Today

Jasmine Libert
Senior Vice President, Data Solutions
Apr 30, 2025
Read More
More Insights
Sign Up For Our Newsletter

Napkyn Inc.
204-78 George Street, Ottawa, Ontario, K1N 5W1, Canada
Napkyn US
6 East 32nd Street, 9th Floor, New York, NY 10016, USA
212-247-0800 | info@napkyn.com

Declutter Your GTM: A Practical Guide to Cleaning Up Tags, Triggers, and Variables
Clean up your GTM setup to reduce bloat, improve tracking accuracy, and stay within limits. Learn how to declutter tags, triggers, and variables today.

Ricardo Cristofolini
Senior Implementation Specialist, Data Solutions
I’m passionate about what I do. If you meet my manager or co-workers, they would say I’m a team player, engaged and always excited to learn something new. Like everyone else I have some flaws. However I’m not afraid to work around those to bring the best in myself and for the company
A cluttered Google Tag Manager (GTM) container can become a silent liability. As your tagging setup evolves, it’s tempting to keep adding tags, triggers, and variables without regularly assessing what still serves a purpose. Over time, this unchecked growth can lead to bloated containers, increased page load times, and even broken data collection. Whether you're running a lean analytics setup or managing complex tracking across multiple platforms, routine clean-ups are essential to maintain accuracy, performance, and scalability. In this guide, we break down best practices for organizing your GTM container - and why now is the perfect time to tidy up.
Why a GTM Container Cleanup Matters
When dealing with GTM implementation, it’s easy to get lost in tags, triggers, and variables if a proper implementation process is not in place. When this work starts, it’s common to feel the desire to track everything down and know every single action a user is doing on your site/app.
However, this comes with a price, even if you have a proper Data Layer in place, which gives you the first step for best practices on GTM tracking. That’s why it’s important to clean up your GTM items as much as possible and more often than you think.
What to Focus On in Your GTM Setup: Tags, Triggers, and Variables
Some key areas to focus on when cleaning up your GTM containers are:
Removing unused tags, triggers, and/or variables
Removing outdated or irrelevant tags, ie.
Google Universal Analytics tags (sunsetted)
Time-based / Page-based campaign tags/triggers/variables that have run their course (e.g. Floodlight tags)
Outdated UI based tags, triggers and variables
Reviewing and removing duplicate elements (e.g. custom variables available as built-in)
Remove any templates not being used and make sure the ones being used are up to date
Be mindful of the naming convention
These are just a few common patterns we’ve observed across many GTM containers over the years. Your container might not require all of these actions - or it might need additional steps not covered here. The key takeaway is to prioritize organization. A well-structured container is easier to maintain, debug, and scale over time.
How Often Should You Clean Your GTM Container?
A good clean-up should always happen when something new is implemented. This will not only give you an overview of what you currently have in place, but it will also open the possibilities to new processes and updates. The same implementation done 2 years ago may not be as good as before and could use some touch-ups.
A proper GTM container clean-up isn’t just about removing outdated or unused items - it’s also about ensuring everything is well-organized and follows best practices in terms of implementation and workflow. Larger containers often get overlooked, and clean-up may be delayed indefinitely. That’s why scheduling a recurring task or dedicated time for container maintenance is a smart and sustainable approach.
Where to Start:
Create a GTM Governance Document
Start by creating a comprehensive list of everything currently in the container. This document is often referred to as a Governance document, though the name may vary depending on the company or team. Its purpose is to centralize all tag, trigger, and variable configurations, allowing for easier verification and alignment, without needing to dive into GTM itself.
Next, review the items directly within GTM. Understand what each tag does, and identify which triggers and variables are associated with it. Don’t overlook the built-in features GTM provides: you can add notes and descriptions to versions and workspaces - features that are often underused. Be sure to take advantage of them for future reference.
Organize Tags by Type for Better GTM Management
Once that foundation is in place, begin organizing your tags into categories. For example:
GA4 Event tags
UA Event tags (believe me, that is not uncommon)
Custom HTML tags
Marketing tags
The number of categories you create will depend on the contents of your container, but the goal is to group similar tags so you can assess and manage them more effectively. Start by focusing on the most critical categories - especially those that heavily impact your container, such as Custom HTML tags.
Review Custom HTML and JavaScript Tags Carefully
While Custom HTML tags offer flexibility, they’re often used to inject code snippets or push data to the Data Layer. In many cases, these actions are better handled outside of GTM (directly on the site) or through a custom template, which offers better maintainability and structure.
Remove Duplicates and Unused Elements in GTM
As you categorize your tags, associated triggers and variables will naturally surface, since they are mapped to specific tags. Any triggers or variables not linked to active tags - and not used elsewhere - can be safely removed.
NOTE: Variables and triggers can be reused across multiple tags, so be careful not to have the same trigger or variable mapped to both a deprecated Universal Analytics (UA) tag and an active GA4 tag. If that’s the case, make sure to disconnect the trigger or variable from the UA tag before removing it. In these situations, only the UA tag should be deleted - not the shared triggers or variables.
Marketing tags often present another challenge, especially campaign-based tags like Floodlight or Google Ads. These tags typically have a short lifespan - sometimes just a few weeks - but are frequently forgotten after the campaign ends. Over time, this can lead to a cluttered container with dozens or even hundreds of outdated tags.
When it comes to variables, you can apply a similar organizational strategy as with tags - grouping them into categories - but there's usually no need to go as deep. The key points to focus on are:
Custom JavaScript
Unused variables
Custom JavaScript variables are powerful because they allow you to manipulate data before it’s sent to GA4. While there’s nothing inherently wrong with using them, relying too heavily on them can bloat your container - both in terms of load time and total container size (which is capped at 200KB). They offer flexibility, but should be used with intention and restraint. When reviewing Custom JavaScript variables, consider asking yourself:
Can any of this logic be moved to the website instead?
Are any of these variables unnecessary and safe to remove?
It’s also important to evaluate your container for duplicate elements - whether tags, triggers, or variables. Once identified, review how each duplicate is being used, choose the most appropriate version to keep, and update references accordingly. After that, you can safely remove the redundant items. These could be tags, triggers, or variables.
This cleanup step helps reduce confusion, minimizes the container’s impact on page performance, and eliminates potential inconsistencies in how data is collected or triggered.
Consolidate Redundant Tags Using Dynamic Variables
Another advanced step in GTM container clean-up is consolidating similar or redundant tags. For example, let’s say that you have multiple GA4 scroll tracking tags like:
GA4 - scroll_progress - 10%
GA4 - scroll_progress - 25%
GA4 - scroll_progress - 50%
etc
Each of these tags likely captures a percent_scrolled event parameter using a hardcoded value like "10%", "25%", or "50%". Instead of managing separate tags, you can consolidate them into a single dynamic tag that uses the Data Layer or GTM’s Built-In Scroll Depth variables to populate the percent_scrolled parameter.
This approach reduces container weight and simplifies tag management. However, it’s important to note that one could argue that making tags more dynamic can also increase complexity, and in some cases, it can. That is why these changes should be carefully evaluated and not rushed - especially if development support is required.
Ultimately, the best approach depends on who manages your GTM container. In some cases, maintaining separate, static tags may be more appropriate for clarity and ease of use.
Final Thoughts: Make GTM Maintenance a Habit
A well-maintained GTM container is more than just a clean workspace—it’s a foundation for accurate data, faster debugging, and scalable marketing operations. By auditing your setup, removing redundant or outdated elements, and implementing a governance process, you not only improve performance but also set your team up for long-term success. GTM clean-up isn’t a one-time task; it’s a recurring best practice. Schedule it, document it, and treat your container like the mission-critical asset it is. Once your GTM audit is complete, don’t forget to extend the clean-up to your GA4 property to ensure your data layer and reporting remain aligned and optimized.
More Insights

What You Need to Know About GA4’s New Cross-Channel Budgeting Tools

Monika Boldak
May 22, 2025
Read More

Declutter Your GTM: A Practical Guide to Cleaning Up Tags, Triggers, and Variables

Ricardo Cristofolini
Senior Implementation Specialist, Data Solutions
May 21, 2025
Read More

Is Your Website Violating California Invasion of Privacy Act (CIPA) ?

Rob English
Lead Implementation Specialist
May 14, 2025
Read More
More Insights
Sign Up For Our Newsletter
