feat(analytics): enable Umami's built-in Web Vitals collection
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 12s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 50s
Build and Push Docker Images / Build Pipeline (Meltano + dbt + Airflow) (push) Successful in 12s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s

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 <noreply@anthropic.com>
This commit is contained in:
Tudor Sitaru
2026-05-19 22:56:33 +01:00
parent 7e182e88b2
commit a7ab624a01
+1
View File
@@ -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"
/>
</head>