From a7ab624a017f3f510f0d8005503aa7906f460879 Mon Sep 17 00:00:00 2001 From: Tudor Sitaru Date: Tue, 19 May 2026 22:56:33 +0100 Subject: [PATCH] feat(analytics): enable Umami's built-in Web Vitals collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds data-performance="true" to the Umami script tag. From v3.1.0+, this hooks PerformanceObserver and posts LCP, INP, CLS, FCP and TTFB to the collect endpoint with Google's rating buckets pre-applied. The Umami dashboard then surfaces them in its built-in Performance tab with p50/p75/p95 percentiles and per-page / per-device breakdowns — no custom event taxonomy needed. Requires the analytics instance to be on Umami ≥ v3.1.0. The attribute is a no-op on older versions, so no risk to ship before upgrading the dashboard. Co-Authored-By: Claude Opus 4.7 --- nextjs-app/app/layout.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/nextjs-app/app/layout.tsx b/nextjs-app/app/layout.tsx index 24dc18d..d7229fd 100644 --- a/nextjs-app/app/layout.tsx +++ b/nextjs-app/app/layout.tsx @@ -78,6 +78,7 @@ export default function RootLayout({ defer src="https://analytics.schoolcompare.co.uk/script.js" data-website-id="d7fb0c95-bb6c-4336-8209-bd10077e50dd" + data-performance="true" strategy="afterInteractive" />