🐛(frontend) reduce PostHog volume from web vitals and opt_in spam

$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.
This commit is contained in:
Anthony LC
2026-09-17 10:35:22 +02:00
parent 10e8b03f14
commit f15544e47e
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -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
@@ -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]);