Core Web Vitals (CWV)
This module collects real-user Core Web Vitals such as LCP, CLS, and INP directly from visitor browsers and stores the data in your Drupal database. It provides insightful reports that correlate these metrics with backend performance signals, helping you understand and improve your site's user experience without relying on third-party services. The module also includes privacy features, customizable data collection, and the ability for other modules to extend its functionality.
Real-user Core Web Vitals for Drupal.
Captures LCP, CLS, INP, FCP, and TTFB from real visitor browsers using the standard web-vitals JS. Stores them in two tables: cwv_beacons for real-user data, cwv_probes for cron-driven synthetic observations. Renders correlation panels at /admin/reports/cwv that join each metric to backend signals.
What you can answer out of the box:
- Does Drupal's page cache hit rate predict LCP on this route?
- Are slow INP outliers concentrated on logged-in pages?
- Did the count of "poor" beacons shift after the deploy on Tuesday?
- Which routes have the worst p75 TTFB?
No third-party service. No JS calls to external endpoints. Data stays in your database.
Privacy and hardening. Capture is off after install. Sampling defaults to 0.1. Per-IP flood protection and a configurable table-size guard defend the endpoint. Three URL-storage policies (hash, path-only, full) cover the GDPR / CCPA exposure the site can tolerate. Outlier filtering is on by default for new installs and drops obvious non-RUM noise (backgrounded-tab artefacts, broken-page beacons) before storage. SECURITY.md and PERFORMANCE.md in the repo cover the full posture and sizing tables.
Built as a substrate. A frozen, security-advisory-covered collector contract with four shapes (synchronous, async-decoration, probe, panel-contribution) lets sibling modules add their own context fields and report panels via a single tagged service. Built-in collectors ship the Drupal cache state, render-tree size, backend cache hit/miss, database query count, OPcache and APCu runtime health, edge-cache state across the major CDN vendors, and upstream / CDN request-ID correlation.
Roadmap in ROADMAP.md. Contract design in docs/collector-contract.md.