discourse/config
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
..
environments DEV: Silence expected error/debug output in system specs (#39164) 2026-04-13 13:59:41 +02:00
initializers DEV: Remove Unicorn web server in favor of Pitchfork (#39032) 2026-04-01 15:04:59 +02:00
locales UX: move post language selector to toolbar, deprioritize for AI (#39208) 2026-04-15 08:25:15 -04:00
application.rb FIX: rack middleware dev warnings (#36460) 2025-12-10 16:15:53 -06:00
boot.rb DEV: Automatically turn on irb autocomplete with debugger (#37052) 2026-01-12 13:29:23 +10:00
cdn.yml.sample
database.yml DEV: Support per-unicorn-worker DB variable overrides (#35615) 2025-10-27 13:45:27 +08:00
deploy.rb.sample
dev_defaults.yml DEV: Convert admin-incoming-email modal to component-based API (#22701) 2023-07-20 16:31:20 -05:00
discourse.config.sample
discourse.pill.sample DEV: Move puma to test-only dependency (#38652) 2026-03-18 05:23:12 +08:00
discourse_defaults.conf FEATURE: Add opt-in IAM role assumption for S3 operations (#39174) 2026-04-15 04:29:50 +08:00
environment.rb DEV: Add env var for local email port (#36900) 2025-12-31 14:25:02 +10:00
logrotate.conf
multisite.yml.production-sample
nginx.sample.conf FIX: Add CORS header for all /assets/* (#39031) 2026-04-01 11:00:18 +01:00
official_plugins.json DEV: Enforce deprecation-free tests for preinstalled plugins/themes (#36445) 2025-12-16 17:48:29 -03:00
pitchfork.conf.rb Revert "DEV: Remove the old non-rollup plugin compiler (#39009)" (#39047) 2026-04-01 18:16:26 +02:00
projections.json DEV: Prepare for rename of app/assets/javascripts/ -> frontend/ 2025-10-22 16:24:11 +01:00
routes.rb FEATURE: Allow changing source repo/branch/key for theme after installation (#38169) 2026-04-02 16:56:19 +01:00
sidekiq.yml
site_settings.yml FEATURE: beacon-based implementation for BPV (#38897) 2026-04-15 16:32:05 +03:00
spring.rb DEV: Apply syntax_tree formatting to config/* 2023-01-09 11:13:29 +00:00
thin.yml.sample
unicorn_launcher DEV: Enable Pitchfork by default (#37679) 2026-02-11 11:52:39 +01:00