From f15544e47ef603cec71640cc81ff7cc0054c557f Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 17 Sep 2026 10:30:49 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20reduce=20PostHog=20vol?= =?UTF-8?q?ume=20from=20web=20vitals=20and=20opt=5Fin=20spam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $opt_in fired on every reconnect since opt_in_capturing() captures an event by default, even though this call just re-enables tracking after a network drop and isn't a real consent action. Also disable web vitals capture, which fed a single low-value insight. --- CHANGELOG.md | 1 + src/frontend/apps/impress/src/services/PosthogAnalytic.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c6fda2c1..8b79a534e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to ### Added - ✨(helm) allow disallowing search engine indexing per instance #2694 +- 🐛(frontend) reduce PostHog volume from web vitals and opt_in spam #2701 ### Fixed diff --git a/src/frontend/apps/impress/src/services/PosthogAnalytic.tsx b/src/frontend/apps/impress/src/services/PosthogAnalytic.tsx index 89e9ede9b..87e13b583 100644 --- a/src/frontend/apps/impress/src/services/PosthogAnalytic.tsx +++ b/src/frontend/apps/impress/src/services/PosthogAnalytic.tsx @@ -69,6 +69,7 @@ export function PostHogProvider({ }, capture_pageview: false, capture_pageleave: true, + capture_performance: { web_vitals: false }, }); const handleRouteChange = () => posthog?.capture('$pageview'); @@ -85,7 +86,7 @@ export function PostHogProvider({ if (isOffline) { posthog.opt_out_capturing(); } else { - posthog.opt_in_capturing(); + posthog.opt_in_capturing({ captureEventName: false }); } }, [isOffline]);