mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-22 17:45:12 +02:00
🐛(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:
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user