Optimize Google Tag Manager (GTM) improves your site’s loading speed by optimizing how GTM and its associated scripts are handled during page load.
When enabled, NitroPack ensures that GTM itself is always loaded, so essential tracking and container logic are in place. However, any third-party scripts loaded through GTM are paused until the user interacts with the page. This keeps your tracking setup functional while preventing non-critical scripts from blocking the initial load.
Why It Matters
Google Tag Manager can load several third-party scripts—ads, analytics, marketing tags—that often aren’t needed right away. These can delay rendering and negatively impact your Core Web Vitals.
With this feature, NitroPack strikes the right balance:
GTM stays active, so important triggers and tags remain intact.
Scripts loaded through GTM are delayed until there’s actual user interaction, minimizing impact on performance.
This leads to faster load times, better user experience, and uninterrupted tracking—all without manual script management.
How to Enable Optimize Google Tag Manager (GTM)
Log in to your NitroPack Dashboard
Go to Cache Settings >> JavaScript
Enable Optimize Google Tag Manager (GTM)
With this feature enabled, NitroPack ensures your GTM setup doesn’t slow down your site.
📌 If you need any assistance or have questions, you can contact our Support team using the chat bubble on the bottom right of this page.