---
title: How to improve Interaction to Next Paint (INP) on Vercel
description: Find the routes and elements behind a poor INP in Speed Insights, fix the slow parts in your Next.js app, and confirm the result with field data.
url: "https://vercel.com/kb/fde/improve-inp-on-vercel"
last_updated: 2026-11-19
authors: Rob Fraser-Humar
---

# How to improve Interaction to Next Paint (INP) on Vercel

Find the routes and elements behind a poor INP in Speed Insights, fix the slow parts in your Next.js app, and confirm the result with field data.

[Interaction to Next Paint (INP)](https://vercel.com/docs/speed-insights/metrics#interaction-to-next-paint-inp) measures how long a page takes to respond visibly after a visitor clicks, taps, or presses a key. Visitors feel it as a button that seems to do nothing, a menu that opens late, or typing that lags. INP is one of Google's Core Web Vitals and carries [30% of the Real Experience Score](https://vercel.com/docs/speed-insights/migrating-from-legacy#updated-scoring-criteria) in Speed Insights.

Aim for a field P75 INP of 200ms or less on the routes that matter. This guide identifies the slow interaction, splits it into its three parts, fixes the cause in a Next.js App Router app, and confirms the result after deployment.

## Spot a slow interaction

Two routes render the same search over 2,000 products. Each row renders in a fraction of a millisecond, but the whole list takes about 600ms. The live meter shows the slowest interaction and splits the last one into its three parts.

![A product search over 2,000 items. As the visitor types "leather", the letters appear in bursts and a live meter shows an INP of about 680ms, almost all of it processing duration.](https://images.ctfassets.net/hjgychtc108g/3FAmmpDkAKY4oiFs2T2xA7/a2e3d9e12a43905fe0f9ef9f8e1c9b00/janky-640.gif)

Every keystroke re-renders the whole list before the browser can paint the new letter, so INP reaches about 680ms.

**Janky:** every keystroke re-renders the whole list before the browser can paint the character. Typed letters arrive in bursts, and INP climbs to about 680ms, almost all of it processing time.

![The same product search. Each letter appears as soon as it's typed while the list catches up, and the live meter shows an INP of about 16ms.](https://images.ctfassets.net/hjgychtc108g/6cMS2DYBatBcHfOOaHVGQH/66c748612cdeecd869590c1c61b03f91/responsive-desktop-light.gif)

With \`useDeferredValue\` and \`memo\`, the input paints first and INP stays at about 16ms.

**Responsive route**: with [`useDeferredValue`](https://react.dev/reference/react/useDeferredValue) and [`memo`](https://react.dev/reference/react/memo) (fix 3), the input paints first and INP stays at about 16ms.

## How INP is scored

Speed Insights rates INP at P75 with these [thresholds](https://vercel.com/docs/speed-insights/metrics#interaction-to-next-paint-inp):

| INP at P75                   | Rating            |
| ---------------------------- | ----------------- |
| 200ms or less                | Good              |
| More than 200ms, up to 500ms | Needs improvement |
| More than 500ms              | Poor              |

INP observes every click, tap, and key press during a visit and reports the longest, ignoring one slowest interaction for every 50 ([web.dev](http://web.dev)). A visit with no interaction produces no INP value. INP [replaced First Input Delay (FID)](https://vercel.com/docs/speed-insights/migrating-from-legacy#updated-scoring-criteria), which timed only the input delay of the first interaction.

Every interaction has three parts. The largest one tells you which fix in Step 4 to start with:

| Part                | What it measures                                   | Common cause in a Next.js app                                      | Start with   |
| ------------------- | -------------------------------------------------- | ------------------------------------------------------------------ | ------------ |
| Input delay         | From the interaction until its handlers start      | Hydration, third-party scripts, or timers still running            | Fix 1 or 5   |
| Processing duration | From the first handler starting to the last ending | A state update that re-renders a large tree, or extra handler work | Fixes 2 to 5 |
| Presentation delay  | From the handlers ending to the next paint         | A large DOM update, or style and layout recalculation              | Fix 6        |

![A timeline. The visitor taps while other work is running. Input delay lasts until that work finishes, processing duration covers the event handlers, and presentation delay covers rendering, up to the next paint. INP runs from the tap to the next paint.](https://images.ctfassets.net/hjgychtc108g/5i6pcXjpNpU4Mv12WFSJwO/7b8eb78e6c0089362c9016662e447ff4/inp-parts-desktop-light.png)

Every interaction has three parts. The largest one tells you which fix to start with.

Speed Insights [sends INP when the visitor leaves the page](https://vercel.com/docs/speed-insights/metrics#understanding-data-points). Depending on the visitor's browser and your Speed Insights settings, interactions on routes reached with client-side navigation, such as through `next/link`, can count against the route the visitor landed on.

## Before you begin

You need:

- Speed Insights enabled on the project. If it isn't, follow the [quickstart](https://vercel.com/docs/speed-insights/quickstart) and add `<SpeedInsights />` from `@vercel/speed-insights/next`.
  
- Speed Insights Plus, available on Pro and Enterprise, for field INP data in the dashboard or from `vercel metrics`.
  
- The latest [Vercel CLI](https://vercel.com/docs/cli) installed, logged in with `vercel login` and linked with `vercel link` from your app's directory (in a monorepo, the app's own directory). Run the commands from there, or add `--project <name>` and `--scope <team>` to query another project. `vercel metrics` doesn't need Observability Plus (see [access metrics with the CLI](https://vercel.com/docs/speed-insights/accessing-metrics-with-vercel-cli)).
  
- Google Chrome, to reproduce interactions in DevTools.
  

**Without Speed Insights Plus**, Speed Insights shows only the Real Experience Score (see [limits and pricing](https://vercel.com/docs/speed-insights/limits-and-pricing)). Use your own real-user monitoring for Steps 1, 2, and 7, or start at Step 3 with the main interactions on your most important routes, using the calibrated low-tier CPU preset.

## Step 1: Confirm you're collecting INP data

Historical charts alone don't prove collection is still running, so check that new data points are arriving:

```shell
vercel metrics vercel.speed_insights.inp_ms --aggregation count \
  --since 1d --environment production --json
```

The total is under `summary`, with an hourly breakdown under `data`. If it's zero, check that the project gets production traffic and that the production deployment includes `<SpeedInsights />`.

## Step 2: Find the slow route and element

In the [Speed Insights](https://vercel.com/d?to=%2F%5Bteam%5D%2F%5Bproject%5D%2Fspeed-insights&title=Go+to+Speed+Insights) dashboard, select **INP**, switch between mobile and desktop, break the data down by route or path, and open **Selectors** from the URL view to [see the elements](https://vercel.com/docs/speed-insights/using-speed-insights#breakdown-by-html-elements). URLs with less than 0.5% of visits are hidden by default. The CLI adds counts and fixed windows, so you can record a baseline and rerun the same queries after the fix.

### Find the slowest busy routes

```shell
vercel metrics vercel.speed_insights.inp_ms --aggregation p75 --group-by route \
  --since 7d --environment production
```

Routes are ordered by data point count, so the top rows have enough traffic for P75 to mean something. The `avg`, `min`, and `max` columns summarize each route's P75 across time buckets. Treat `avg` as typical, or add `--json` and read `summary` for the P75 across the whole window. [`--limit`](https://vercel.com/docs/cli/metrics#limit) sets how many routes come back per bucket (10 by default), and [`--granularity`](https://vercel.com/docs/cli/metrics#granularity) sets the bucket size.

With [`jq`](https://jqlang.org/), this keeps the routes among your 50 busiest whose P75 is above 200ms:

```shell
vercel metrics vercel.speed_insights.inp_ms --aggregation p75 --group-by route \
  --since 7d --environment production --limit 50 --json \
  | jq '.summary[] | select(.vercel_speed_insights_inp_ms_p75 > 200) | {route, p75: (.vercel_speed_insights_inp_ms_p75 | round)}'
```

A route can pass this filter on one or two slow visits, so check its count before you pick it. If even your busiest routes have few data points, widen `--since` within the date range your plan allows.

### Compare device types

Pick a route with a P75 above 200ms. From here on, use one fixed `--since` and `--until` pair in every query, replacing the example timestamps with your own:

```shell
vercel metrics vercel.speed_insights.inp_ms --aggregation p75 --query 'route:"/search"' \
  --group-by deviceType --since 2026-11-02T00:00:00Z --until 2026-11-09T00:00:00Z \
  --environment production
```

Run it again with `--aggregation count` and read the `total` column. Keep the double quotes inside the single quotes, so dynamic segments such as `[slug]` reach the CLI intact.

Mobile is often worse because phones have slower CPUs, but a device type with few data points can also look worse by chance. `(not set)`, or `null` or an empty string in `--json`, means Speed Insights didn't record a value. If INP rose without a deploy, check your traffic mix first, as in Step 7.

### Find the slow element

Group the same route by `attributionTarget`, the element the visitor interacted with, and `attributionEventName`, the kind of interaction:

```shell
vercel metrics vercel.speed_insights.inp_ms --aggregation p75 --query 'route:"/search"' \
  --group-by attributionTarget --group-by attributionEventName \
  --since 2026-11-02T00:00:00Z --until 2026-11-09T00:00:00Z \
  --environment production
```

`attributionTarget` is a CSS selector that uses the element's ID when it has one, such as `#search`, and otherwise its tag and classes, such as `button.text-left.z-10`. `attributionEventName` is a kind such as `pointer` or `keyboard`, or an event name like `keyup`. Add `--json` to see long selectors in full, search your code for the ID or most distinctive classes, and rerun with `--aggregation count` to check the element has enough data points to matter.

- `(not set)` usually means the element was removed before the interaction was recorded, such as a menu item that closes its menu, or that it's inside a shadow DOM ([PerformanceEventTiming.target](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEventTiming/target)). If it's a large, slow group, start Step 3 with menus, dialogs, and anything else that disappears when selected.
  
- **A shared element**, such as the site header or a cookie banner, improves every route that uses it with one fix.
  
- **An element that isn't on its listed route** probably belongs to a route reached with client-side navigation. Speed Insights [sends INP when the visitor leaves the page](https://vercel.com/docs/speed-insights/metrics#understanding-data-points). In Chromium-based browsers, `@vercel/speed-insights` 2.1.0 and later records INP for each [soft navigation](https://vercel.com/docs/speed-insights/metrics#navigation-types), such as through `next/link`. In other browsers, or with `softNavs={false}`, those interactions count against the landing route. The dashboard's **Navigation Type** switch compares the two.
  

## Step 3: Find which part of the interaction is slow

Field data shows which route and element are slow. To find out why, reproduce the interaction:

1. Open a production build of the route in Chrome, such as a preview deployment or `next build && next start`, not `next dev` ([production checklist](https://nextjs.org/docs/app/guides/production-checklist)). Open the DevTools [Performance panel](https://developer.chrome.com/docs/devtools/performance/overview). Its live metrics view captures your local INP, and the Interactions table lists each interaction with its element and timings.
   
2. Turn on CPU throttling. Select **Calibrate** in the CPU throttling menu to create low- and mid-tier mobile presets, try a few levels, and pick the one where lab INP comes closest to the Step 2 field P75 for the worst device type. Use that level for every test, so lab results predict the field.
   
3. Repeat the flagged interaction. Without an element, work through the route's main interactions, such as typing, opening a menu, or selecting a button. For an element on a route reached with client-side navigation, start from the route Speed Insights lists and navigate there the way a visitor would.
   
4. Record a trace while you interact. The [INP breakdown](https://developer.chrome.com/docs/performance/insights/inp-breakdown) insight splits the slowest interaction into its three parts.
   

![The Chrome DevTools Performance panel's live metrics view on the demo's janky route, with a poor local INP and the Interactions table listing the input element and the input delay, processing duration, and presentation delay of each keystroke.](https://images.ctfassets.net/hjgychtc108g/6Ehh6fFB5ewmXlgnCpdRVO/224d3e10621bf18d52c983a683dbceb5/devtools-live-metrics-desktop-light.png)

The live metrics view records your local INP as you interact. These numbers use 4x CPU throttling.

These numbers use 4x CPU throttling, so INP is higher than the demo's 680ms.

![A Chrome DevTools performance trace of one keystroke on the demo's janky route. The Interactions track shows one long interaction, and the INP breakdown insight shows processing duration as by far the largest part.](https://images.ctfassets.net/hjgychtc108g/5VFaTZzMP919quO17vqG1H/732f616777b7c62807744c5985e66c0d/devtools-inp-breakdown-desktop-light.png)

The INP breakdown insight splits the slowest interaction into its three parts. Here, processing duration takes almost all of the time.

Processing duration takes almost all of the time.

Find the largest part in the table in How INP is scored and start with its fix. A large input delay means something else was running, so the handler may not be the cause: check the main thread right before the interaction. To identify which components re-rendered, build locally with `next build --profile`, run `next start`, and record the interaction in the [React Developer Tools](https://react.dev/learn/react-developer-tools) Profiler. Profiling adds overhead, so use a regular production build for your INP baseline and final timing comparisons.

Write down the route, device type, P75 INP, element, slowest part, and responsible script or component as your baseline. Work from route-level numbers: a project INP of 150ms can hide a search page at 450ms.

## Step 4: Fix the slow part

### 1\. The page is still busy when the visitor interacts

Input during load waits for the JavaScript that's running, including hydration. Only Client Components hydrate, so ship fewer of them. Keep layouts, pages, and static content as Server Components, and add `'use client'` to the files that define interactive components, not to large parts of the tree ([reducing JS bundle size](https://nextjs.org/docs/app/getting-started/server-and-client-components#reducing-js-bundle-size)).

Wrap independent sections of the remaining Client Components in their own `<Suspense>` boundaries. Each boundary hydrates separately, so React works in smaller tasks and prioritizes the section the visitor is interacting with ([Streaming and INP](https://nextjs.org/docs/app/guides/streaming#inp-interaction-to-next-paint)). Keep the LCP element outside them, and don't add boundaries you don't need, because React can show any boundary's fallback when the network or CPU is slow.

Scheduled work also causes input delay: a `setInterval` that re-renders a ticker or polls every second can land right before a click. Run it less often, or only while it's visible.

### 2\. A state update re-renders more than it needs to

A state update re-renders the component that owns the state and everything below it before the browser can paint, and all of that counts as processing duration. In the demo, one query state sits above a 2,000-row list, so every keystroke re-renders the list.

- Keep state in the component that uses it, and lift it up only when other components need it.
  
- Skip components whose props didn't change with memo. The React Compiler does this across your app but is off by default. On Next.js 16 or later, install babel-plugin-react-compiler as a dev dependency and set `reactCompiler: true` in `next.config.ts`, or use `create-next-app --react-compiler`. With `compilationMode: 'annotation'`, it only compiles components marked `'use memo'`.
  

`memo` only helps when props stay the same. Functions and objects created during render, such as inline `onClick={() => ...}` handlers, are new every time, so wrap them in [`useCallback`](https://react.dev/reference/react/useCallback) or [`useMemo`](https://react.dev/reference/react/useMemo), or let the compiler do it. In the demo, the list gets a new query on every keystroke, so memo alone doesn't help. Fix 3 changes when it gets it.

### 3\. An update that could wait blocks the paint

Some updates must show in the next frame, such as a typed character or a pressed button. Others can follow, such as a filtered list or a new tab's content. Mark those as non-urgent, so React paints the urgent update first and renders the rest in the background, interrupting if another interaction arrives.

Use [`useDeferredValue`](https://react.dev/reference/react/useDeferredValue) when you receive the value, such as input text. This is the demo's responsive route:

```tsx
'use client';

import { memo, useDeferredValue, useState } from 'react';
import { ResultList } from './result-list';

const MemoResultList = memo(ResultList);

export function ProductSearch() {
  const [query, setQuery] = useState('');
  const deferredQuery = useDeferredValue(query);
  const isStale = query !== deferredQuery;

  return (
    <>
      <input value={query} onChange={(e) => setQuery(e.target.value)} placeholder="Search products" />
      <div style={{ opacity: isStale ? 0.5 : 1 }}>
        <MemoResultList query={deferredQuery} />
      </div>
    </>
  );
}
```

The input re-renders with `query` straight away. The list re-renders only when `deferredQuery` changes, `memo` keeps it out of the input's render, and `isStale` dims old results while new ones render.

Use [`useTransition`](https://react.dev/reference/react/useTransition) when you set the state yourself, such as when a tab or button changes: wrap the update in `startTransition`, and use `isPending` to show new content is coming. Neither hook makes the list render faster; they keep the input responsive. If the list itself is too slow, add fix 2 or fix 6.

### 4\. The handler does work the visitor doesn't need to see

Handlers often also send analytics, write to `localStorage`, or recalculate data. When that runs before the handler returns, the visitor waits. Update the UI first, then yield to give the browser a chance to paint before continuing nonessential work. INP stops counting at the next paint, so check the Performance trace to confirm that rendering happens before that work resumes (see [How to improve Core Web Vitals](https://vercel.com/kb/guide/how-to-improve-core-web-vitals#shorten-processing-duration)).

```tsx
'use client';

import { useState } from 'react';
// Your own slow, non-visual work, such as an analytics call and a localStorage write.
import { saveCart, trackAddToCart } from './cart';

// Yield to the browser, then continue in a later task.
function yieldToMain(): Promise<void> {
  // Support older TypeScript DOM declarations.
  const { scheduler } = globalThis as {
    scheduler?: { yield?: () => Promise<void> };
  };

  // Resumes before other tasks of the same priority.
  if (scheduler?.yield) return scheduler.yield();

  // Fallback where scheduler.yield isn't available, such as Safari.
  return new Promise((resolve) => setTimeout(resolve, 0));
}

export function AddToCartButton({ productId }: { productId: string }) {
  const [added, setAdded] = useState(false);

  async function handleClick() {
    // Schedule the visible feedback.
    setAdded(true);

    // Give the browser a chance to render.
    await yieldToMain();

    // Continue nonessential work in a later task.
    trackAddToCart(productId);
    saveCart(productId);
  }

  return (
    <button type="button" onClick={handleClick}>
      {added ? 'Added' : 'Add to cart'}
    </button>
  );
}
```

`scheduler.yield()` isn't available in every browser, so the helper falls back to `setTimeout` where it's missing, such as in Safari ([reduce input delay](https://vercel.com/kb/guide/how-to-improve-core-web-vitals#reduce-input-delay)).

Move work that doesn't touch the DOM, such as large calculations, to a web worker ([shorten processing duration](https://vercel.com/kb/guide/how-to-improve-core-web-vitals#shorten-processing-duration)).

### 5\. Third-party scripts run on the interaction

Tag managers, analytics, session replay, and A/B testing tools attach their own click and key listeners. Their code runs in the same interaction as yours, adding to processing duration, or to input delay when it runs just before, so your handler can be fast and the interaction still slow.

Select the interaction in the Performance trace to see the scripts on the main thread beneath it. In Chromium-based browsers, the [Long Animation Frames API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceLongAnimationFrameTiming) also logs them. Run this, repeat the interaction, and look for script URLs from other origins:

```javascript
new PerformanceObserver((list) => {
  for (const frame of list.getEntries()) {
    for (const script of frame.scripts) {
      console.log(Math.round(script.duration), 'ms', script.invokerType, script.invoker, script.sourceURL);
    }
  }
}).observe({ type: 'long-animation-frame', buffered: true });
```

Then cut what runs on each interaction:

- Remove unused tags, and include the rest only in the pages or layouts that need them ([Scripts](https://nextjs.org/docs/app/guides/scripts)).
  
- Narrow tag manager triggers. A tag set to fire on every click runs on every click.
  
- Load scripts the first view doesn't need with the `lazyOnload` strategy in [`next/script`](https://nextjs.org/docs/app/api-reference/components/script). This cuts input delay during load, but listeners still run on every interaction once loaded.
  

For experimentation tools, see how to [run ecommerce A/B tests without delaying rendering](https://vercel.com/kb/guide/ecommerce-ab-testing-core-web-vitals).

### 6\. The update is expensive to render

After the handlers finish, the browser recalculates styles and layout for everything that changed, then paints. A large DOM slows every update.

- Render fewer elements. Virtualize long lists and tables so only visible rows render. Find-in-page can't reach rows that aren't rendered.
  
- Apply `content-visibility: auto` to large off-screen sections. The browser skips their rendering but keeps them available to find-in-page and the accessibility tree.
  
- Batch layout reads before DOM writes. Reading geometry, such as `offsetHeight`, after a change that invalidates layout can force the browser to recalculate layout synchronously. Repeatedly alternating writes and reads causes layout thrashing.
  

## Step 5: Hand it to an agent (optional)

A coding agent with the Vercel CLI set up can run this investigation for you. Start it in the directory you linked in the "Before you begin" section, so its queries go to the right project without it needing to link anything. Give it the breakdown you recorded in Step 3, since the CLI doesn't report the three parts, and the CPU throttling level you picked.

The agent can find the slow route and element itself. Without Speed Insights Plus, it can't read field data, so give it the route and element you found in Step 3 instead. Adapt the prompt to your project:

If your agent supports the Model Context Protocol, [Vercel MCP](https://vercel.com/docs/agent-resources/vercel-mcp) also connects it to your Vercel account.

### Agent prompt

```txt
Investigate poor INP on this Vercel project. If I name a route, start there: `<route>`. In DevTools, the slowest part is `<input delay | processing duration | presentation delay>` at `<value>` ms. If I haven't filled these in, choose the route from the field data and say that the slow part is inferred.

Start read-only: only run `vercel metrics` and read code. Do not edit files, change settings, link projects, or deploy without my approval, and don't pull or print environment variable values.

1. Read the field data with `vercel metrics`, using `--environment production` and `--json`:
   - P75 INP by route over the last 7 days, with `--limit 50`. Results come in data point count order. List routes whose P75 under `summary` is above 200ms, with their counts.
   - For the chosen route, use one fixed window (`--since <window-start> --until <window-end>`, ISO timestamps) and `--query 'route:"<route>"'`. Get P75 and count grouped by `deviceType`.
   - Group the same query by `attributionTarget` and `attributionEventName`, for P75 and count, to find the slowest elements with real traffic.

   If a group has only a few data points, say so rather than relying on it. If the queries return no INP values, the project may not have Speed Insights Plus. Skip this step and work from the route and element I give you.

2. Find the code for the slowest element by searching for its ID or most distinctive classes. If the largest slow group is `(not set)`, list the route's menus, dialogs, and other elements that remove themselves when selected, as likely candidates.

3. Inspect that code and the route:
   - where `'use client'` sits and how much of the tree it pulls into the client bundle;
   - Suspense boundaries, and whether the LCP element sits inside one;
   - every event handler on the element and what it does before returning;
   - which state it updates, where that state lives, and how many components re-render;
   - whether `memo`, `useDeferredValue`, `useTransition`, or `reactCompiler` are in use;
   - lists or tables rendered without virtualization;
   - `setInterval`, polling, or other timers;
   - and third-party scripts loaded with `next/script` or a tag manager that listen to clicks or key presses.

   Also check the `@vercel/speed-insights` version and any `softNavs` prop. If soft-navigation reporting is off, or much of the traffic comes from non-Chromium browsers, look for the element on routes reached from `<route>` with client-side navigation too. Flag any link component that navigates on `pointerdown` and calls `preventDefault()`, because Chrome doesn't detect those navigations as soft navigations.

4. Return the slow part and the code that causes it, with evidence, the smallest fix, its risk (including any change to LCP, CLS, or find-in-page), and how to verify it: in DevTools at the same CPU throttling as my baseline, and in Speed Insights after deploy by comparing P75 and count for a week before and a week after the deploy, starting each window at midnight UTC and skipping the day of the deploy.
```

## Step 6: Check the fix on a preview

1. Deploy the change to a preview.
   
2. Repeat the interaction a few times at your baseline CPU throttling level, using the Performance panel’s live metrics and a recorded trace. Check that the part you targeted shrank and that the total is 200ms or less.
   
3. If you added Suspense boundaries, deferred rendering, or virtualization, check LCP, CLS, and find-in-page on the route. Check that deferred tracking events and `lazyOnload` scripts still work.
   

Lab numbers vary between runs, so treat them as direction and rely on field data for the result. On a low-traffic project, that can take weeks, so the preview check carries more weight until then.

## Step 7: Verify after you ship

1. Ship to production and note when the change went live.
   
2. Once traffic has built up, compare the week after the deploy with the week before, starting both windows at midnight UTC and skipping the deploy day. For a deploy on November 9, compare November 2–8 with November 10–16:
   

```bash
# Before the deploy
vercel metrics vercel.speed_insights.inp_ms --aggregation p75 --query 'route:"/search"' \
  --group-by deviceType --since 2026-11-02T00:00:00Z --until 2026-11-09T00:00:00Z \
  --granularity 1d --environment production --json

# After the deploy
vercel metrics vercel.speed_insights.inp_ms --aggregation p75 --query 'route:"/search"' \
  --group-by deviceType --since 2026-11-10T00:00:00Z --until 2026-11-17T00:00:00Z \
  --granularity 1d --environment production --json
```

`data` has one row per day for each device type, and `summary` has the window's P75. Run both again with `--aggregation count`, within your plan's [date range](https://vercel.com/docs/speed-insights/limits-and-pricing).

1. For the baselined device type, check that daily P75 is lower and at 200ms or less on most days. INP only comes from visits with an interaction, so wait for enough traffic, and compare `summary` if days have few data points.
   
2. Compare counts by `deviceType`, `country`, and `browserName` across both windows. More phones, a slower new market, or a browser shift can move P75 with no change to your app, and also explains a rise without a deploy. If the mix changed, compare P75 within each group.
   
3. To see the change at the deploy itself, run the query with `--group-by deploymentId --since 14d` and compare the deployments either side of the fix. This works if you deploy a few times a week; many deploys a day leave each with too few data points.
   
4. Rerun the Step 2 element query for both windows. In the dashboard, the element should have left the poor column in **Selectors**. For a shared component, check the other routes that use it, and for an element on a soft-navigated route, check the landing route too.
   
5. To catch regressions, create a [custom monitor](https://vercel.com/docs/alerts/configure-alerts#configure-custom-monitors) in **Settings > Alerts** (needs [Observability Plus](https://vercel.com/docs/observability/observability-plus)). Measure Speed Insights INP at P75, filter to production, group by **Route**, alert above 200ms, and use the **1d** window, since short windows jump around on quiet routes. Add context for Vercel Agent, such as the route and element you fixed, so it knows where to start investigating.
   

## Next steps

- See [How to improve Core Web Vitals](https://vercel.com/kb/guide/how-to-improve-core-web-vitals) to learn how INP fits with LCP and CLS.
  
- If you added Suspense boundaries or deferred content, check paint speed and layout stability with [Improve CLS on Vercel](https://vercel.com/kb/guide/cls-on-vercel).
  
- Get an early warning before field data arrives with a Deployment Checks integration that reports TBT and a [Virtual Experience Score](https://vercel.com/docs/speed-insights/metrics#predictive-performance-metrics-with-virtual-experience-score) per deployment.
  
- Keep Speed Insights Plus costs predictable with [Managing usage and costs](https://vercel.com/docs/speed-insights/managing-usage). A lower sample rate also means fewer data points behind each P75, which matters most on low-traffic routes.
  

## Related resources

- [Speed Insights metrics](https://vercel.com/docs/speed-insights/metrics)
  
- [Access Speed Insights metrics with the Vercel CLI](https://vercel.com/docs/speed-insights/accessing-metrics-with-vercel-cli)
  
- [`vercel metrics`](https://vercel.com/docs/cli/metrics) reference
  
- [Server and Client Components](https://nextjs.org/docs/app/getting-started/server-and-client-components)
  
- [Streaming in Next.js](https://nextjs.org/docs/app/guides/streaming)
  
- [How to improve Core Web Vitals](https://vercel.com/kb/guide/how-to-improve-core-web-vitals#how-to-improve-inp-on-vercel)
  
- [useDeferredValue](https://react.dev/reference/react/useDeferredValue) and [useTransition](https://react.dev/reference/react/useTransition)
  
- [MDN PerformanceEventTiming](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEventTiming)

## More FDE Field Notes

- [Set up Speed Insights behind a reverse proxy with multiple Vercel projects](/kb/fde/speed-insights-behind-reverse-proxy): Configure Speed Insights and Web Analytics to collect data when a reverse proxy such as Akamai or Cloudflare routes one domain to several Vercel projects.

- [Six enterprise redirect antipatterns](/kb/fde/six-enterprise-redirect-antipatterns): Avoid broken migration URLs and unnecessary application work. Choose the right redirect method and test changes before cutover.

- [Optimize CSS output after moving Next.js from webpack to Turbopack](/kb/fde/optimize-turbopack-css): Diagnose larger CSS after moving Next.js to Turbopack. Use the agent skill to compare route-level output, identify causes, and test targeted fixes.

## Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

- [Agent stack](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)

## Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

[Browse the prompt library](/kb/prompts) · [Read the Markdown index](/kb/prompts.md)
