In short
Monitoring performance means automatically measuring, at a fixed interval, the real speed of the site and of its key templates, then being warned when a metric deteriorates. Three sources complement each other: real data from Chrome users (CrUX), scheduled lab tests on sample pages, and your own field measurements (RUM). Once this check is done, a daily reading feeds a history, and an alert goes out when LCP, INP or CLS crosses a threshold or deteriorates clearly from one week to the next.
Why it matters
Performance deteriorates bit by bit: a tracking script added by marketing, a carousel on the homepage, an unoptimized image, a plugin update, a server that slows down as the database grows. None of these changes breaks the site; together, they push LCP from 2 to 3.5 seconds within a few months.
Google assesses the experience based on CrUX data, aggregated over a rolling 28 days. A regression deployed today only fully appears in the Search Console Core Web Vitals report after several weeks, and the report does not say which deployment caused it. Daily monitoring sees the trend turn within the first few days, and lab tests point to the page and the moment.
Core Web Vitals are among the experience signals Google takes into account, without outweighing the relevance of the content. Their clearest effect is on visitors: abandonment, page views, conversions. For generative engines, there is no documented link between Core Web Vitals and citations; only the server response time matters for a crawler fetching the page.
What it improves
- Detection time A regression is spotted within a few days instead of several weeks.
- Diagnosis The dated history, cross-referenced with the deployment log, points to the cause.
- Experience and conversion Pages stay fast on mobile, where most of the traffic is.
- Rankings A modest, indirect effect, through page experience signals.
- AI citations No documented effect, apart from the server's response time to crawlers.
How to check
Answer these questions:
- Are the origin's mobile p75 values for LCP, INP and CLS recorded automatically, at least every week?
- Are sample pages, one per template, lab-tested at a fixed interval?
- Is an alert threshold defined, and does a named person receive the alert?
- Can you say which deployment caused the last deterioration?
For today's state, open CrUX Vis or PageSpeed Insights on the origin: the thresholds for a good experience are an LCP of 2.5 s or less, an INP of 200 ms or less and a CLS of 0.1 or less, at the 75th percentile.
How to implement
Before you start
Organize monitoring in three tiers:
| Tier | Source | Frequency | What it detects | Limit |
|---|---|---|---|---|
| Field, origin | CrUX API (daily) and CrUX History (weekly) | Every day | Real trend on mobile and desktop | 28-day window, minimum traffic required |
| Lab, sample pages | PageSpeed Insights API, Lighthouse | Every day and after each deployment | A template regression, with its date | Simulated conditions, variable results |
| Field, your measurements (RUM) | web-vitals library, Vercel Speed Insights, Cloudflare, Shopify, paid tool |
Continuously | Pages and browsers missing from CrUX | Depends on consent and on the tool |
Create an API key in the Google Cloud console (enable “Chrome UX Report API” and “PageSpeed Insights API”, then Credentials > Create credentials > API key) and restrict it to these two APIs. The CrUX API is free, limited to 150 requests per minute per project.
Set the alert thresholds. Suggested baseline (monitoring conventions, to be adjusted):
- Field: an origin p75 above the “good” threshold (2,500 ms, 200 ms, 0.1), or an increase of more than 10% in seven days.
- Lab: the performance budget (opens in a new tab) exceeded two days in a row on the same page. Lab tests vary from one run to the next; requiring two consecutive days avoids false alerts.
Daily CrUX reading
The daily CrUX API returns the p75 values for the last 28 days, updated every day around 4 a.m. UTC. This Bash script (with curl and jq) records one line per day and alerts above the thresholds or when there is an increase of more than 10% compared with seven days earlier. Save it as /srv/controles/crux-quotidien.sh:
#!/usr/bin/env bash
# Records the origin's mobile CrUX p75 values every day and alerts above the thresholds.
set -u
ORIGINE="${ORIGINE:-https://example.com}"
CSV="${CSV:-/srv/controles/crux-mobile.csv}"
reponse=$(curl -s -X POST "https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=$CRUX_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"origin\": \"$ORIGINE\", \"formFactor\": \"PHONE\", \"metrics\": [\"largest_contentful_paint\", \"interaction_to_next_paint\", \"cumulative_layout_shift\"]}")
IFS=, read -r lcp inp cls < <(echo "$reponse" | jq -r '.record.metrics
| [.largest_contentful_paint, .interaction_to_next_paint, .cumulative_layout_shift]
| map(.percentiles.p75 // "" | tostring) | join(",")' 2>/dev/null)
if [ -z "${lcp:-}" ]; then
echo "CrUX: no data for $ORIGINE (insufficient traffic or invalid key)"
exit 1
fi
il_y_a_7_jours=$(tail -n 7 "$CSV" 2>/dev/null | head -n 1)
echo "$(date +%F),$lcp,$inp,$cls" >> "$CSV"
alertes=$(awk -v l="$lcp" -v i="$inp" -v c="$cls" -v ref="$il_y_a_7_jours" 'BEGIN {
n = split(ref, r, ",")
if (l > 2500) print "LCP p75 " l " ms (threshold 2500)"
if (i != "" && i > 200) print "INP p75 " i " ms (threshold 200)"
if (c != "" && c > 0.1) print "CLS p75 " c " (threshold 0.1)"
if (n == 4 && r[2] > 0 && l > r[2] * 1.1) print "LCP up more than 10% in 7 days: " r[2] " -> " l " ms"
if (n == 4 && r[3] > 0 && i > r[3] * 1.1) print "INP up more than 10% in 7 days: " r[3] " -> " i " ms"
}')
if [ -n "$alertes" ]; then
echo "$alertes"
exit 1
fi
echo "CrUX $ORIGINE mobile: LCP $lcp ms, INP $inp ms, CLS $cls"
Schedule it every day at 7 a.m., after the data update:
0 7 * * * cd /srv/controles && CRUX_API_KEY=YOUR_KEY ./crux-quotidien.sh > /tmp/crux.log 2>&1 || mail -s "Core Web Vitals: CrUX alert" [email protected] < /tmp/crux.log
The resulting CSV feeds a chart in Google Sheets or Looker Studio directly. For the 40-week history and building a dashboard, see track Core Web Vitals (opens in a new tab). Replace PHONE with DESKTOP in a second call for desktop, and "origin" with "url" for a page that has enough traffic.
Scheduled lab tests
The sample pages are the same as for monitoring titles and structured data (opens in a new tab): one per template, in pages-temoins.txt. This script queries the PageSpeed Insights API in mobile mode, records the score, LCP, TBT (Total Blocking Time, the lab metric closest to INP) and CLS, and alerts when a page exceeds its budget two days in a row. Save it as /srv/controles/psi-quotidien.sh:
#!/usr/bin/env bash
# Daily lab test (PageSpeed Insights, mobile) of the sample pages.
set -u
PAGES="${PAGES:-/srv/controles/pages-temoins.txt}"
CSV="${CSV:-/srv/controles/psi-mobile.csv}"
LCP_MAX=4000
TBT_MAX=600
ALERTES=0
while read -r url || [ -n "$url" ]; do
[ -z "$url" ] && continue
adresse=$(jq -rn --arg u "$url" '$u | @uri')
ligne=$(curl -s -m 120 "https://www.googleapis.com/pagespeedonline/v5/runPagespeed?url=$adresse&strategy=mobile&category=performance&key=$PSI_API_KEY" \
| jq -r --arg u "$url" '.lighthouseResult as $r | [
(now | strftime("%Y-%m-%d")), $u,
($r.categories.performance.score * 100 | round),
($r.audits["largest-contentful-paint"].numericValue | round),
($r.audits["total-blocking-time"].numericValue | round),
($r.audits["cumulative-layout-shift"].numericValue * 1000 | round / 1000)
] | @csv' 2>/dev/null)
if [ -z "$ligne" ]; then
echo "PSI: test failed for $url"
ALERTES=$((ALERTES + 1))
continue
fi
echo "$ligne" >> "$CSV"
depassements=$(grep -F "\"$url\"" "$CSV" | tail -n 2 | awk -F, -v l="$LCP_MAX" -v t="$TBT_MAX" '$4 > l || $5 > t' | wc -l)
if [ "$depassements" -eq 2 ]; then
echo "PSI: budget exceeded two days in a row for $url ($ligne)"
ALERTES=$((ALERTES + 1))
fi
done < "$PAGES"
[ "$ALERTES" -eq 0 ]
Schedule it every night, and also run it after each deployment:
30 5 * * * cd /srv/controles && PSI_API_KEY=YOUR_KEY ./psi-quotidien.sh > /tmp/psi.log 2>&1 || mail -s "Performance: budget exceeded" [email protected] < /tmp/psi.log
The LCP_MAX and TBT_MAX values are loose alert thresholds; replace them with your budget. A PageSpeed Insights test often takes more than ten seconds per page: keep the list short.
When the site has a continuous integration pipeline, Lighthouse CI does the same job before going to production, with several runs per page and budget assertions: see integrate SEO, performance and accessibility tests into CI/CD (opens in a new tab). The two complement each other: Lighthouse CI blocks a regression in the code, while the scheduled test catches those that arrive without a deployment (a third-party script changed by its vendor, heavier content, a slower server).
With Search Console
The Core Web Vitals report groups URLs and emails the property's owners and users when a new issue appears. Read it once a month, and after a fix, click “Validate Fix”: validation tracks the page group over 28 days. The report is empty when the site does not have enough Chrome traffic; lab tests and your own real-user measurements then take over.
With a paid monitoring tool
DebugBear, SpeedCurve and Calibre schedule lab tests from several regions, collect real-user measurements, keep the history and send alerts by email or messaging. They are worth it when several teams deploy often, or to compare the site with competitors under the same conditions. The scripts above cover the essentials for free.
Cloudflare
Versions Cloudflare dashboard, November 2026; recurring tests from the Pro plan.
Cloudflare Observatory, in the domain's dashboard, runs Lighthouse-based synthetic tests from one of the 21 available regions. Recurring tests are daily: 5 per month on Pro, 10 on Business, 15 on Enterprise, according to Cloudflare's documentation. Observatory also shows real-user measurements (RUM), INP included; on the free plan, they are turned on automatically, except for traffic from the European Economic Area, the United Kingdom and Switzerland. Schedule a recurring test on each of your most important pages.
Vercel
Versions Vercel, all plans, November 2026.
Speed Insights measures the real performance experienced by visitors to the deployed site. The base offering, available on all plans, shows the Real Experience Score; individual Core Web Vitals, the breakdown by country and export to other tools require Speed Insights Plus. Enable it in the project's Speed Insights tab, then add the component provided by the @vercel/speed-insights package to your layout, following the quickstart guide. Filter on the production environment so as not to mix in previews.
Shopify
Versions Shopify, all plans, November 2026.
Shopify's web performance dashboard shows LCP, INP and CLS at the 75th percentile, based on real visits: a summary on the Online Store > Themes page, detailed reports in Analytics > Reports. The data covers the last 30 days, can be up to 36 hours late and remains available for 90 days. The charts over time annotate app installations and theme changes: that is the first thing to look at after a deterioration. Shopify does not send alerts: add the daily CrUX reading.
WordPress
Versions WordPress 6.4 and later.
WordPress does not measure performance itself. Use the scripts on an external machine, and run the lab test after each update of a plugin, theme or page builder: these are the most frequent causes of regression. A page cache cleared just before the test skews the first run's measurement; test a page that is already cached, as visitors will see it.
Laravel
Versions Laravel 11 to 13.
If the application runs on a server you manage, the scheduler can run both scripts, in routes/console.php:
use Illuminate\Support\Facades\Schedule;
Schedule::exec(base_path('scripts/crux-quotidien.sh'))
->dailyAt('07:00')
->environments(['production'])
->emailOutputOnFailure('[email protected]');
Schedule::exec(base_path('scripts/psi-quotidien.sh'))
->dailyAt('05:30')
->environments(['production'])
->emailOutputOnFailure('[email protected]');
emailOutputOnFailure sends the script's output when it fails, that is, when it finds an alert. API keys go in the server's environment, not in the repository.
Next.js
Versions Next.js 15 and 16 (App Router).
The useReportWebVitals hook collects real-user measurements from visitors. Create a client component and import it in the root layout:
// app/_components/web-vitals.tsx
'use client';
import { useReportWebVitals } from 'next/web-vitals';
const reportWebVitals: Parameters<typeof useReportWebVitals>[0] = (metric) => {
const body = JSON.stringify({
name: metric.name,
value: metric.value,
rating: metric.rating,
page: window.location.pathname,
});
navigator.sendBeacon('/api/web-vitals', body);
};
export function WebVitals() {
useReportWebVitals(reportWebVitals);
return null;
}
The function is defined outside the component so that its reference stays stable, as the documentation requires. The /api/web-vitals route stores the measurements in your database or analytics tool; then calculate the 75th percentile per page and per day, and alert on the same thresholds as CrUX. Check the consent requirements before collecting.
Common mistakes
- Alerting on the Lighthouse score: it varies from one test to the next and does not measure the real experience. Alert on field p75 values and on lab budgets confirmed two days in a row.
- Monitoring only desktop: mobile is almost always slower, and it is mobile that weighs in the assessment of most sites.
- Reading a CrUX trend day by day: each reading covers 28 days; a fix takes about four weeks to have its full effect.
- Testing from the site's own server: the test then measures a local network, not a visitor's experience.
- Forgetting the deployment log: without it, every break in the curve becomes an investigation. See keep a history of changes (opens in a new tab).
- Testing pages behind a consent banner without realizing it: scripts loaded after acceptance do not appear in the test. See test before and after cookie consent (opens in a new tab).
Frequently asked questions
How do I get alerted when Core Web Vitals deteriorate?
To be alerted when Core Web Vitals deteriorate, query the CrUX API every day for the site's origin and compare the p75 values of LCP, INP and CLS with Google's thresholds and with the previous week. Search Console also sends an email when a new issue appears in its report, but several weeks late. Paid tools such as DebugBear, SpeedCurve or Calibre include these alerts.
Why does my PageSpeed score change with every test?
The PageSpeed Insights score comes from a single lab test, sensitive to server load, the network, third-party scripts and the ads loaded at that moment. A few points of difference from one test to the next are normal. For monitoring, record several tests over time, alert only on a budget overrun confirmed two days in a row, and base your decisions on real CrUX data.
My site has no CrUX data: how can I monitor its performance?
A site without CrUX data does not have enough visits from Chrome users to be published in that report; it is not a penalty. Monitor its performance with scheduled lab tests on one page per template, and collect your own real-user measurements with the web-vitals library or your platform's tool, such as Vercel Speed Insights, Cloudflare or the Shopify dashboard.
How often should you measure a site's performance?
Measure performance automatically every day: a daily CrUX reading for the real trend, and a daily lab test on one page per template. Add a test after each deployment or plugin update, which are the main causes of regression. Analyze the trend every week and read the Search Console report once a month.
Resources
- Chrome for Developers: CrUX APIdeveloper.chrome.com
- Chrome for Developers: CrUX History APIdeveloper.chrome.com
- Google: get started with the PageSpeed Insights APIdevelopers.google.com
- web.dev: Core Web Vitals thresholdsweb.dev
- Cloudflare: Observatory synthetic testsdevelopers.cloudflare.com
- Vercel: Speed Insightsvercel.com
- Shopify: web performance dashboardhelp.shopify.com
- Next.js: useReportWebVitalsnextjs.org
Updated on
Topic checklist (PDF)