Slim down Google Tag Manager

Updated
Requirements

Audit your tags, scope your triggers, and keep Google Tag Manager from slowing your site.

Google Tag Manager (GTM) lets you add analytics, ad pixels, and other tools to your site from one container, without editing your pages each time. That convenience has a catch, though: tags pile up, and each one that fires adds scripts and downloads to your visitor's browser. Trimming your container helps your pages load faster.

Audit the tags that actually fire

Start by finding out what your visitors load. You might find tags for tools nobody remembers installing, plus extra scripts from tools like consent managers.

To audit your container:

  1. Open your container in Google Tag Manager
  2. Click Preview to start Tag Assistant
  3. Type in your published site's URL
  4. Click Connect, then browse your site like a visitor
  5. List every tag that fires on a typical page view
  6. Mark each tag as needed, unsure, or unused

Delete what you don't use

Remove old campaign pixels, retired experiments, and tags for platforms you no longer use. Deleting them from the container entirely stops them from loading, which is better than pausing them.

Every tag, trigger, and variable adds to your container's size, and a larger container takes longer to download and run. Review your container each time you add several tags, and remove anything you no longer need. For a deeper look, read Chrome's guide to third-party JavaScript.

Scope triggers to the pages that need them

A purchase tracking tag belongs on your checkout page, not your homepage. Use trigger conditions so each tag only loads where it can fire.

Load GTM only where you use it

If most of your tags target marketing pages, consider adding the GTM container to those pages instead of the whole site. In Webflow, you can add the snippet in the custom code section of each page's settings instead of in your site settings. Learn more about connecting Google site tools. To see how scope works for any custom code, read Optimize custom scripts.

Prefer native integrations

When Webflow integrates natively with a tool, use the integration instead of pasting a snippet through GTM. Native integrations are built to load efficiently. Learn more about Google site tools.

Consider server-side tagging

Server-side tagging runs tag processing on your own server instead of in your visitor's browser. It can help with both privacy and speed, but it requires engineering work to set up and maintain. Start by getting your standard container lean first.

Keep your tags in check