Skip to main content
How-to

How to implement inp (interaction to next paint) for an Ecommerce Store

By Β· Updated Β· 6 min read

What Implementing INP Actually Means for an Ecommerce Store

INP (Interaction to Next Paint) measures the time from a user's input β€” a click, tap, or keypress β€” to the next visible frame the browser paints in response. Google's threshold for a passing score is 200ms or under. For ecommerce stores, the interactions that most commonly fail this threshold are add-to-cart buttons, quantity selectors, filter menus, and checkout form fields.

Implementing INP is not a single code change. It is a diagnostic and remediation cycle: measure which interactions are slow, identify the JavaScript work causing the delay, reduce or defer that work, then verify the fix in field data. The steps below follow that cycle in order.

Step 1 β€” Measure Your Current INP in the Field and in the Lab

Start with field data, not lab data. Open Google Search Console and navigate to Core Web Vitals. Filter by device type (mobile and desktop separately) and identify which URL groups have poor or needs improvement INP scores. Export the list β€” these are your highest-priority pages.

For lab reproduction, install the Chrome extension Web Vitals and record interactions manually on the pages flagged by Search Console. Supplement this with PageSpeed Insights, which shows INP alongside its attribution breakdown. The attribution tells you whether the delay sits in the input delay phase, processing phase, or presentation delay phase β€” each phase points to a different fix.

If your store runs significant traffic, CrUX (Chrome User Experience Report) data in the Google BigQuery public dataset gives interaction-level percentile breakdowns. Prioritize fixing interactions above the 75th percentile first, since INP is scored at the 75th percentile of all interactions in a session.

Step 2 β€” Profile Slow Interactions in Chrome DevTools

Open Chrome DevTools, go to the Performance panel, and click Record. Trigger the slow interaction β€” click the add-to-cart button, open a filter drawer, or type in a search field. Stop recording and locate the interaction in the timeline. Look for long tasks (shown as red-flagged blocks) on the main thread that overlap with the interaction.

Expand the call stack for each long task. The most common culprits in ecommerce are: third-party tag scripts executing synchronously during click handlers, large re-renders triggered by state updates in React or Vue, and analytics or A/B testing libraries that fire on every interaction. Note the exact function names and scripts responsible.

Use the Interactions track in the Performance panel (available in Chrome 112 and later) to see the exact breakdown of input delay, processing duration, and presentation delay for each recorded interaction. This breakdown is the same model INP uses, so the profiler output maps directly to which phase needs fixing.

Step 3 β€” Fix the Main-Thread Bottlenecks in Priority Order

For long input delays caused by a blocked main thread, break up the blocking work using scheduler.yield() or setTimeout(0) to yield control back to the browser between tasks. Event handlers on buttons or filters should not contain synchronous loops processing large arrays. Move heavy computation β€” such as recalculating filter facet counts β€” off the main thread using a Web Worker.

For long processing durations, audit your click-handler code. Remove any synchronous DOM queries inside handlers; cache references outside the handler. If the store uses React, check whether the interaction triggers a large reconciliation cascade. Wrap non-critical UI updates in React's startTransition API so the browser can prioritize the visible frame first. For Vue stores, use v-once on static sections that don't need re-evaluation during interactions.

For presentation delays caused by large paint areas, reduce the number of DOM elements updated per interaction. A filter toggle that re-renders 400 product tiles is slower than one that toggles a single class on a container. Audit CSS animations triggered by interactions and ensure they run on compositor-only properties (transform and opacity) rather than properties that trigger layout recalculation.

Step 4 β€” Audit and Constrain Third-Party Scripts

Third-party scripts are the leading cause of INP failures on ecommerce stores. Chat widgets, retargeting pixels, A/B testing platforms, and session recording tools all attach event listeners that fire on user interaction. To diagnose their impact, use Chrome DevTools' Coverage panel to identify scripts with high unused byte ratios, and the Performance panel's Bottom-Up view filtered to third-party domains.

Load third-party scripts with the async or defer attribute where possible, and evaluate whether any can be loaded on user interaction (the 'faΓ§ade' pattern) rather than on page load. A live chat widget loaded only after the user clicks a chat icon cannot block an add-to-cart interaction. Tag managers that fire synchronously on DOMContentLoaded are a common source of main-thread congestion β€” audit each tag and remove any that fire synchronously.

Step 5 β€” Verify Fixes with Field Data and Iterate

After deploying changes, field data takes 28 days to fully reflect in Google Search Console because CrUX aggregates a rolling 28-day window. Use the Chrome User Experience Report directly in BigQuery to query more granular weekly data and detect improvements faster. PageSpeed Insights also shows CrUX data for the current 28-day window and updates continuously.

Set up Real User Monitoring (RUM) using the web-vitals JavaScript library. The library's onINP callback logs each session's INP value along with the element that triggered it, giving you ongoing production diagnostics without waiting for CrUX. Send this data to your analytics platform and create an alert for pages where the 75th percentile INP exceeds 200ms.

Treat INP as a recurring audit item, not a one-time fix. New feature releases, A/B test additions, and third-party script updates all introduce new interaction bottlenecks. Schedule a monthly performance review against your RUM data to catch regressions before they accumulate.

Frequently asked questions

What is the passing INP score for ecommerce pages?

Google defines a good INP as 200ms or under. Scores between 201ms and 500ms need improvement, and anything above 500ms is considered poor. These thresholds apply to the 75th percentile of all interactions recorded across user sessions on a page, meaning occasional slow interactions matter less than a consistently slow 75th percentile.

Which ecommerce interactions cause the most INP failures?

Add-to-cart buttons, product filter and sort controls, size and variant selectors, and checkout form fields are the interactions that most frequently cause INP failures. These actions typically trigger JavaScript-heavy state updates, analytics events, and third-party tag callbacks simultaneously, all competing for main-thread time and delaying the browser's ability to paint the responsive UI update.

How is INP different from FID (First Input Delay)?

FID measured only the delay before the browser began processing the very first interaction on a page, and it ignored the time needed to actually paint a response. INP measures the full interaction latency β€” input delay plus processing time plus presentation delay β€” for every interaction in a session, then scores the 75th percentile. INP replaced FID as a Core Web Vital in March 2024.

Can a high-performing Shopify or other platform store still fail INP?

Yes. Platform infrastructure has no bearing on INP because INP is determined entirely by main-thread JavaScript execution in the user's browser. A store on any platform can fail INP if it loads heavy third-party scripts, uses a theme with bloated JavaScript, or triggers large React or Liquid re-renders on user interactions. The fix requires auditing the scripts and handlers running in the browser, not the hosting environment.

How long does it take for INP improvements to show up in Google Search Console?

Google Search Console reflects CrUX data, which is a rolling 28-day average. A fix deployed today will not fully appear in Search Console for approximately 28 days. To see faster feedback, query the Chrome User Experience Report directly in BigQuery for weekly breakdowns, or deploy Real User Monitoring using the web-vitals library and track your own 75th-percentile INP data in near-real time.

MG
Written by

Matt is the founder of RunOctopus. He built All Angles Creatures from zero to page-1 rankings in reptile feeder insects in under 60 days using exactly this method β€” turning a hard, entrenched niche into RunOctopus's proof store for programmatic SEO and AI search citation.

Connect on LinkedIn →

See what Otto would build for your store

Free architecture preview. No card required. Five minutes.

Generate Preview →