main ← xfalcox:segment-embed-traffic-analytics
approved 08:13PM - 24 Apr 26 UTC
**Previously**, pageviews served inside the full app embed iframe (`?embed_mode=…true`) were counted into the same `ApplicationRequest` counters as regular community traffic (`page_view_logged_in`, `page_view_anon`, `page_view_*_browser`, `page_view_*_beacon`) and also incremented `topic_views` / `topics.views`, polluting the admin dashboard numbers.
**In this update**, add a single new `page_view_embed` enum variant on `ApplicationRequest` and route all embed pageviews into it. Embed pageviews no longer increment any other `page_view_*` counter and no longer call `defer_topic_view`. Detection is server-side via `?embed_mode=true` on the initial HTML load, and via a `Discourse-Track-View-Embed` XHR header / `embed: true` beacon JSON field for subsequent SPA and beacon pageviews. Crawler and `http_total` counters are unchanged.
The new counter is exposed in two places on the admin reports page:
- As a fifth, yellow band on the **Site traffic** stacked chart (hidden by default, like the existing *Other traffic* and *Known crawlers* series — toggleable via the chart legend).
- As a standalone **Embedded pageviews** (`page_view_embed_reqs`) report in the reports list.