GTM Performance: What Actually Matters

Pierre Natier19 Jan 2026

Problem

Marketing wants more tags and finer data. Engineering wants fewer milliseconds, because slow tags hurt Interaction to Next Paint (INP), a Core Web Vitals metric. ManoMano runs about 70 active tags, 120 triggers and 300 variables across 5 websites. The team wanted to know what really slows Google Tag Manager (GTM) before spending effort on it.

Example from the article: In a single-page app (SPA) test journey the dataLayer grew from 35 entries on the first pageview to 359 by the 21st, and GTM execution time rose by about 90% between the 2nd and 12th pageview.

Solution in brief

Measure GTM phases in a scripted browser, then check every candidate fix against real-user INP. The main finding: a growing dataLayer slows an SPA, while unused tags do not. Clearing old dataLayer entries before each virtual pageview, while keeping GTM bootstrap and consent events, removed the slowdown.

Questions this case answers
  • How to stop client-side tracking code from degrading page responsiveness over a long session in an app that never reloads
  • How to tell which tracking optimizations improve real-user latency when lab benchmarks and field data disagree
  • How to keep Google Tag Manager fast when a single-page app keeps growing its dataLayer?
  • How to find out which tags and variables slow down interactions (INP) for real users?

Tools and methods

  • Google Tag Manager — tag container whose execution time is measured; its monitoring API gives time per tag
  • Puppeteer — automated Chrome runs that replay a user journey
  • ngrok — tunnel from the local test environment to mimic real-world conditions
  • Didomi — consent platform that pushes didomi-ready and didomi-consent events into the dataLayer
  • dataLayer reset — prune the array on each virtual pageview, keeping a whitelist of events
Continue reading — it's free

Google or a one-time email code. No password.