Find which script causes slow INP in field data

Chromium browsers record the scripts in each slow frame after a tap. Real user monitoring keeps the longest one per visit and ranks the files by slow visits.

Arjen KarelArjen KarelUpdated November 22, 2026

How do you find which script is causing slow INP?

In short

  • In Chromium browsers, the Long Animation Frames API records the scripts that ran in each slow frame after an interaction.
  • A real user monitoring (RUM) script keeps the longest one per visit, and you read the files on your slow mobile interactions from the top down.
  • Pair each script with the tapped element and the moment in the page load, then send the file to whoever owns it.

Search Console, PageSpeed Insights and most RUM charts show that Interaction to Next Paint (INP) is slow on a page or a group of URLs. The name of the file that held up the tap comes from your visitors' browsers. With an INP problem I first find out what runs on the main thread when someone clicks.

Without a RUM tool, a developer can collect the script, the element and the load state with Google's web-vitals attribution build; Finding and fixing INP issues on corewebvitals.io has the code.

Why can't a lab test tell you which script it is?

Lighthouse loads the page without clicking or typing, so its report has no INP and no interaction script. A DevTools trace shows every function of one click on your own computer, once you know which element to click and when (Step 3 of finding and fixing INP issues).

Real visitors tap other controls on slower phones, often while the page is still loading. For each page view, a RUM script records the slowest interaction with its element, load state and input type, and in Chromium browsers the longest script in the slowest long animation frame: a frame of over 50 ms from its first task to the paint (the Long Animation Frames (LoAF) API guide explains the rest).

Which scripts are named on your slowest interactions?

Sort the scripts by the slow mobile page views they were named on, and the top of the list is short. In anonymized totals across CoreDash sites on mobile in the 28 days up to 20 November 2026, the median site had 46 scripts named on slow interactions, yet the top three covered about 70% of those with a script, and five covered 80%.

In CoreDash, open the INP page on Mobile, where good INP is 200 ms or less at p75. The Scripts card sorts the files by "Over 200 ms", the slow page views each file was named on.

The Scripts card on the INP page.

"Named on" counts every page view where the script was the longest one in the slowest frame, and "p75 INP" is the INP of those page views. The line beside the title says what share of slow interactions got a script name, and how much of that came from other hosts.

A file on the page's own hostname shows as a path, such as /assets/js/theme.js; every other host is marked "third party", even when it is your own CDN. Build hashes are stripped, so each deploy of a bundle stays one row. "Inline script" is code in the page's HTML, "Unknown source" code without a URL, such as eval(). The name is the longest script only: another script in the same frame, or the rendering after the handler, can be part of the wait.

What does "Slow script host" mean?

A "Slow script host" issue means that on the page views where a script from one host was named, INP was over 200 ms at p75 (or the project's p90 or p95), on at least 100 page views, per device over the last 7 days. It is the Scripts card's data grouped by host, so your own files open it only from a separate CDN host. "Open the INP page with these page views" opens the Scripts card filtered to that host; "Open filtered view" opens Explore, where you break INP down by "INP script" (Metrics and dimensions).

A "Slow script host" issue page on mobile.

Which element was tapped, and did it happen while the page was loading?

The tapped element and the moment in the page load tell you where and when to tap to reproduce the slow interaction. On the INP page, the "INP element" tab of the Pages table lists the selector of the element behind each page view's slowest interaction, such as button.add-to-cart. "No element (removed from the page)" means the element was gone before the browser reported the interaction.

The "INP element" tab, most page views over 200 ms first.

"Filter to this" on a row narrows the whole INP page, the Scripts card included, to that element. A "Slow interactions on an element" issue comes from this breakdown, when INP for one element is over 200 ms at p75 on at least 100 page views, per device over the last 7 days. Its third fix step breaks INP down by "INP script" for that element, because a third-party listener on the same element often does the work.

The Interaction card on the INP page shows whether the slow taps came during load.

The Interaction card: the load state and input type of the slow interactions.

Loading, "DOM interactive" and "DOM content loaded" are during load, Complete is after it, and the verdict at the top says which was slowest. A slow tap during load points at startup scripts or framework hydration still holding the main thread; Step 2 of finding and fixing INP issues covers those causes.

Why does a slow interaction have no script named?

Long Animation Frames work only in Chromium browsers, so a slow interaction in Safari or Firefox never gets a script named. Across 1.04 million slow mobile interactions in the same 28 days of anonymized CoreDash totals, about one in five came from browsers without Long Animation Frames, and in Chromium browsers about three in four got a script name. A period without any shows "No scripts named in this period".

  • Safari and Firefox still report INP, the element and the load state (MDN browser compatibility), and every browser on an iPhone uses Safari's engine. Your pages run the same JavaScript in every browser, so fixing what Chromium names helps Safari visitors too.
  • Short frames or rendering work: frames of 50 ms or less and scripts of 5 ms or less are left out, so a tiny handler followed by heavy style and layout work lists no script.
  • Iframes, workers and extensions: scripts in a cross-origin iframe (most ads), a worker or a browser extension get no attribution.
  • A tag manager or framework: the entry names the script that was called first, so a tag can show up as the tag manager and your handler as the framework. A DevTools trace of that click shows what ran inside.
  • Cross-origin scripts without CORS keep their file URL but lose the function name. Adding crossorigin="anonymous" brings it back when the host sends an Access-Control-Allow-Origin header; on a host that doesn't send it, the attribute blocks the script:
<script src="https://cdn.chatwidget.example/loader.js" crossorigin="anonymous" defer></script>

The Long Animation Frames API guide covers the remaining cases.

Is it your own code or a third party, and who fixes it?

Who owns the file decides who fixes it: your own code or theme goes to your developer, a plugin or a Shopify app to its maker (or off, if nothing needs it), and a tag to whoever runs the tag manager.

For your own theme, bundle or CDN asset, give your developer the script path, the "INP element" selector, "Slowest during load" or "Slowest after load" from the Interaction card, and the sub-phase ("Input Delay", "Processing Time" or "Presentation Delay") furthest past its good line. In the event handler, update the screen first, then yield so the browser paints before the follow-up work:

await scheduler.yield();

Safari has no scheduler.yield(), so wrap it in a helper with a setTimeout fallback; Step 4 of finding and fixing INP issues has one. The code fix per sub-phase is on corewebvitals.io: input delay, processing time and presentation delay.

For a WordPress plugin or a Shopify app, check whether those pages use its feature at all. Switch unused ones off one at a time and watch the Scripts card; for one you keep, send its maker the file URL and the tapped element.

For a tag, whoever runs the tag manager can load it only on the pages that need it, or ask the vendor for a lighter version. When a vendor tag does too much in your click, the fix is rarely removing the tag: move its work until after the screen has updated.

What can you do when it's a third party you can't change?

When the slow script is a third party you can't change, such as a chat widget or a review embed, load it only on the templates where visitors use it, put a chat widget behind a static button until someone clicks it, or start the widget after the page has finished loading.

Leave the "Delay JavaScript" settings of cache plugins off. They hold every script back until the first interaction, which passes a lab test because Lighthouse never clicks. Then every delayed script runs at the visitor's first tap, and that tap counts for INP.

How do you check that the fix worked?

Filter the INP page on Mobile to the "INP script" or "INP element" you changed, and compare the days after the deploy with the days before. Field data shows new visits within hours, weeks before Search Console's rolling 28-day window. An open "Slow script host" or "Slow interactions on an element" issue closes itself after three runs in a row without a finding.

For the whole route from Search Console and a DevTools trace to the code fix, read finding and fixing INP issues and the Long Animation Frames (LoAF) API guide on corewebvitals.io.

Sources: Long Animation Frames API (Chrome for Developers), PerformanceLongAnimationFrameTiming (MDN), Long Animation Frames specification (W3C), Interaction to Next Paint (web.dev).

Track your first site free.No card needed. Setup takes about 5 minutes.

Start free trialBook a demo