discourse/frontend
Osama Sayegh 27a843fa0f
FEATURE: beacon-based implementation for BPV (#38897)
This commit adds a new parallel page view counting system that uses `fetch` with `keepalive: true` to POST to a dedicated `/srv/pv` endpoint, gated behind the `use_beacon_for_browser_page_views` site setting.                                                                                                                                                                        

Unlike the existing deferred tracking (which piggybacks on AJAX headers), the beacon approach sends page view data directly as a JSON body. Both systems run simultaneously when the setting is enabled to allow comparing counts before fully migrating.

Key details:
                                                                                                                                                                                                                                      
* New middleware endpoint `POST /srv/pv` short-circuits with 204
* Dedicated `ApplicationRequest` counters (`*_beacon`) track beacon page views separately from the existing browser page view counters
* A separate `:beacon_browser_pageview` DiscourseEvent avoids double-firing with the existing `:browser_pageview` event
* On Ember route transitions, `routeDidChange` sends the beacon. For non-Ember pages (e.g. `/pub/*`), `pageview.js` handles it

Internal topic: t/179398.
2026-04-15 16:32:05 +03:00
..
asset-processor DEPS: Bump @rollup/browser from 4.60.0 to 4.60.1 (#39120) 2026-04-09 18:08:56 +02:00
custom-proxy DEPS: Bump glob from 13.0.0 to 13.0.6 (#38191) 2026-03-04 12:29:35 +01:00
deprecation-silencer Revert "DEV: Remove the old non-rollup plugin compiler (#39009)" (#39047) 2026-04-01 18:16:26 +02:00
discourse FEATURE: beacon-based implementation for BPV (#38897) 2026-04-15 16:32:05 +03:00
discourse-i18n DEV: Add a script for generating external types in discourse-types (#37095) 2026-03-09 20:37:43 +01:00
discourse-markdown-it FIX: Escape markdown characters in upload filenames (#39133) 2026-04-14 10:37:41 +02:00
discourse-plugins DEPS: Bump ember-cli from 6.11.0 to 6.11.2 (#39105) 2026-04-13 13:57:29 +02:00
discourse-types DEPS: Bump @types/node from 25.0.10 to 25.3.3 in the types group (#38391) 2026-03-10 11:12:22 +01:00
ember-cli-progress-ci
pretty-text DEPS: Bump ember-cli from 6.11.0 to 6.11.2 (#39105) 2026-04-13 13:57:29 +02:00
.npmrc
polyfills.js