main ← xfalcox:segment-embed-traffic-analytics
opened 05:53PM - 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 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 not yet surfaced in the admin dashboard — that's deliberate scope.