# 15-May-2026 — cookieless analytics with PECR-compliant beacon and dashboard [ref: #217](https://github.com/nbarrett/ngx-ramblers/issues/217)

## [build 644](https://github.com/nbarrett/ngx-ramblers/actions/runs/25931730355) — [commit 0283fcd](https://github.com/nbarrett/ngx-ramblers/commit/0283fcd6ad04a2851c11f232ca8c3b470346e6a3)

_____

### Adds Cloudflare Web Analytics to NGX: a cookieless, PECR-compliant visitor beacon and an in-app dashboard
- It sets no cookies, so no cookie-consent banner is needed. 
- A step-by-step how-to guide for group administrators, covering the split between the central Cloudflare setup and the per-group NGX configuration, is published [here](https://www.ngx-ramblers.org.uk/how-to/technical-articles/2026-05-15-cloudflare-web-analytics-setup). 
- Dashboard shows page view and visit totals, a timeseries chart, top paths,
countries, referrers, devices and browsers, and Core Web Vitals, queried via
Cloudflare's RUM GraphQL API; preset ranges plus a date range slider. Screenshot below sums up the look and feel on offer:

![](https://ngx-ramblers.org.uk/api/aws/s3/site-content/b562a98a-25a1-4bf7-9bfc-608cd6d89af0.jpeg)


### What was done
- Beacon injects beacon.min.js with the site's beacon token at app startup when
Web Analytics is enabled
- System Settings holds two separate fields: Beacon Token (the data-cf-beacon
token) and Site Tag (the RUM site tag used for analytics queries)
- Web Vitals uses the rumWebVitalsEventsAdaptiveGroups sum aggregates
- No in-app create-site button: Cloudflare's RUM site_info REST API rejects the
scoped API token NGX uses, so sites are created in the Cloudflare dashboard and
linked by pasting the Beacon Token and Site Tag

### Bundled with this work, a codebase-wide typing cleanup:

- Convert all string-literal union types to string TypeScript enums; values are
unchanged so wire, Mongo and query-string values are preserved
- Add an ESLint rule banning string-literal union types
- Relocate enums and stray exported interfaces/types into *.model.ts files