This project is not covered by Drupal’s security advisory policy.
Real-user Core Web Vitals tracking with backend correlation. Captures Largest Contentful Paint, Interaction to Next Paint, Cumulative Layout Shift, First Contentful Paint, and Time to First Byte from real visitor sessions, and stores each measurement in Drupal alongside backend signal that external CWV/RUM tools can't easily access: cache hit/miss state, route name, anon/auth state, plus context contributed by sibling modules via a tagged-service collector pattern.
The angle
Most CWV tracking on Drupal is either a thin pixel that sends metrics to an external SaaS, or it doesn't exist on Drupal.org at all. CWV's distinguishing feature is that every beacon is enriched with Drupal-side signal — and the collector pattern means sibling modules can register their own context contributions, so an LSCache integration can stamp x-litespeed-cache: hit/miss onto each beacon, a Jelastic integration can stamp env state, etc. The module is designed to answer "why is this page slow on Tuesdays at 11am?" with both frontend metrics and backend operational signal in one place.
Key features
- Self-hosted end-to-end: bundled JavaScript using
PerformanceObserver, in-Drupal beacon endpoint, custom database table. No external CDN, no external service, no third-party data flow navigator.sendBeacondelivery so end-of-pageview metrics (which finalise on visibilitychange) are not lost when the user navigates away- Privacy-first defaults: URL storage policy
pathby default (no query strings, hash + path only), 30-day retention, never stores user IDs / role names / IPs / session identifiers - Configurable sampling rate for high-traffic sites where 100% sampling produces too many rows
- Tagged-service
cwv_context_collectorextension point: sibling modules register their own context contributions without forking - Allow-listed metric names and parameterised inserts on the public beacon endpoint
Roadmap
Aggregations (per-route median / p75 / p95, per-metric distributions, time-series view) and the real DrupalCacheCollector implementation land in 1.0.0-alpha4. Sibling-module integration submodules ship as 1.0.0-alpha5 (cwv_lscache, depends on drupal/lscache) and 1.0.0-alpha6 (cwv_jelastic, depends on drupal/jelastic_info). The parent cwv module remains independent of those modules and works standalone — operators who never want LSCache or Jelastic enrichment never install the integration submodules.
Requirements
- Drupal 10.3 or later, or Drupal 11
- No additional modules required for the core
cwvmodule
Status
1.0.0-alpha3. Foundation release; data-correctness verified end-to-end. Aggregations and integration submodules in active development. Suitable for evaluation, dev environments, and early adopters running alongside a control site. Not production-ready until at least 1.0.0-beta1.
Project information
- Project categories: Administration tools, Performance, Search engine optimization (SEO)
16 sites report using this module
- Created by dinis on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
