According to DEV Community, a store can load quickly and score well in Lighthouse yet still feel laggy when a shopper taps Add to cart. The author, a web studio working on e-commerce performance, says the cause is often not the store's own code but the pile of third-party scripts added over time: a chat widget, a session-replay tool, tracking pixels, a review badge and a tag manager that loads more tags.
The delay is measured by Interaction to Next Paint (INP). The article says INP replaced FID as a Core Web Vital in March 2024. It times the gap from a tap, click or key press to the next frame the user sees. 200 ms or less is good and above 500 ms is poor. Unlike FID, it counts the whole interaction and every interaction, not just the first input delay.
The post names three places where outside scripts add delay. They can keep the main thread busy when the tap arrives. They can attach listeners to the whole document that run on every interaction. And when a click handler pushes an event to Google Tag Manager, tags tied to that event can run inside the handler before the cart icon updates.
To find the culprits, the author suggests the Long Animation Frames API, available in Chromium since version 123, which shows which scripts ran during a slow frame, with their source URLs. For real visitors, the web-vitals library (v4+) exposes the same data for the actual INP interaction. The fixes run from cheap to costly: remove unused scripts, load the chat widget only on first click, update the interface and yield to the browser before analytics work, delay non-critical scripts until idle, and, with care, move scripts off the main thread using a tool such as Partytown.
Why it matters
A fast load time does not guarantee a responsive page. INP is a Core Web Vital, and the button that matters most to a shop, Add to cart, is exactly where a slow response is felt. The article's point is that the cause may sit in marketing and support tools rather than in your own code.
The post also makes a practical case for talking to the business side. If you can show the script, what it does, who uses its data and the milliseconds it adds to key interactions, decisions about removing or delaying a tool become easier. The author notes that delaying scripts has a cost, as visitors who leave early may be missed, so each tag needs its own decision.
Source: DEV Community. This brief summarises their reporting; read the original for the full detail.