fix: remove invasive settings (#884)

This commit is contained in:
Ankush Menat 2025-06-02 19:03:54 +05:30 committed by GitHub
parent d34ee6fe48
commit 895da1a812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,7 +49,8 @@ function initPosthog(ps: PosthogSettings) {
capture_pageview: true,
capture_pageleave: true,
enable_heatmaps: false,
disable_session_recording: false,
disable_session_recording: true,
advanced_disable_decide: true,
loaded: (ph: typeof posthog) => {
window.posthog = ph
ph.identify(window.location.hostname)
@ -67,17 +68,9 @@ function capture(
}
function startRecording() {
if (!isTelemetryEnabled()) return
if (window.posthog?.__loaded) {
window.posthog.startSessionRecording()
}
}
function stopRecording() {
if (!isTelemetryEnabled()) return
if (window.posthog?.__loaded && window.posthog.sessionRecordingStarted()) {
window.posthog.stopSessionRecording()
}
}
// Posthog Plugin