fix(posthog): disable bot UA filter on staging so e2e can exercise surveys

posthog-js silently drops every capture when userAgentData.brands contains
HeadlessChrome (UA string/webdriver masking doesn't help), which also starves
event-triggered surveys in Playwright runs against dev.sase.tr. Production
keeps the bot filter.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 00:49:20 +03:00
parent 72c3fe0dc2
commit 7f5db3234b

View File

@@ -41,6 +41,9 @@ export function initPostHog(): void {
// PII leak.
autocapture: false,
enable_heatmaps: true,
// Staging only: don't drop events from automation UAs (Playwright e2e of
// surveys/flags runs against dev.sase.tr). Prod keeps the bot filter.
opt_out_useragent_filter: window.location.hostname !== "sase.tr",
session_recording: {
maskAllInputs: false,
maskInputOptions: { password: true },