According to DEV Community, a post from the Codevibe blog says Google Tag Manager is usually the biggest single cost on a marketing site. On the team's own Next.js homepage, Tag Manager with GA4 and Google Ads inside it loaded 470 KiB of script. It caused 4.2 of the 4.7 seconds of Total Blocking Time (the time the main thread is stuck and cannot respond) in Lighthouse's mobile run.
The authors audited the site in November 2026. The homepage failed on mobile with a PageSpeed score of 54. They say a 4K hero film and the marketing tags were the two main causes. They kept every tag but moved them all behind the visitor's first interaction. Third-party blocking time fell from 4,335 ms to 0 ms. They note that other fixes, such as the film and images, also helped the overall score, so not all of the improvement comes from the tags.
The post compares loading options in Next.js. It says the official @next/third-parties package fetches Tag Manager after hydration, so the work still lands while the page settles. The worker strategy runs scripts off the main thread, but the Next.js docs say it is not stable and does not work with the App Router yet. The authors' approach creates the tag queues (dataLayer, gtag, fbq, lintrk) at once, so early events wait in line. The vendor scripts load on the first pointerdown, keydown, touchstart or scroll, or 5 seconds after load.
The team released this as an open-source package, next-deferred-tags, version 0.3 on 16 November 2026. It supports several tags, both Next.js routers and consent handling, including Consent Mode v2. The authors admit one trade-off: a visitor who leaves within the delay without touching the page is not counted. They suggest a shorter delay, immediate loading on key landing pages, or sending key conversions server-side.
Why it matters
Tag scripts compete with your own code while the page loads. The article ties that to Total Blocking Time, to Interaction to Next Paint (how quickly a page reacts to taps and clicks) and to slower loading on phones. If your marketing tags run through Tag Manager, they may be a larger cost than your images or your own code.
Deferring tags is not free. You may lose some very short visits from your analytics, and consent rules still apply however late a tag loads. Treat any change as a trade between speed and measurement, and check that conversions and consent still work afterwards.
Source: DEV Community. This brief summarises their reporting; read the original for the full detail.