INP · medium impact

Google Analytics / Tag Manager is blocking the page

Google Tag Manager and Analytics tags on your page spend a significant amount of time on the main thread while the page is loading.

Why it matters

Every tag inside Tag Manager runs JavaScript. Several measurement IDs or a crowded container can easily add hundreds of milliseconds of blocking time, hurting INP.

How to fix it in WordPress

  1. Audit your Tag Manager container and remove tags, triggers and duplicate GA4 IDs you no longer use.
  2. Make sure analytics is installed once — not by both a plugin and Tag Manager.
  3. Delay analytics until user interaction with your performance plugin, or use a lightweight local analytics script.

Plugin-specific steps

Already using one of these plugins? Follow the exact steps for your setup.

Perfmatters

  1. 1Go to Settings → Perfmatters → Analytics and toggle on 'Enable Local Analytics' if you only need basic GA4 page views.
  2. 2Otherwise, go to Assets → JavaScript → 'Delay JavaScript' and add 'googletagmanager.com' to the delayed scripts list.
  3. 3Save and clear your cache, then confirm visits still appear in GA4 Realtime.

WP Rocket

  1. 1Go to Settings → WP Rocket → File Optimization.
  2. 2Check 'Delay JavaScript execution' — Google Analytics and GTM are delayed by default.
  3. 3Save changes and confirm visits still appear in GA4 Realtime.

How to verify the fix

  • Run Maki again and check the third-party section — Google Tag Manager's main-thread time should drop.
  • Confirm GA4 Realtime still records your visit.

Be careful

  • Delaying analytics can slightly undercount visitors who bounce without interacting. For most sites the speed gain is worth it.

Find out which of these your site has.

Free scan with real Google data. Exact fixes for your plugins.