Merge pull request #885 from frappe/mergify/bp/main-hotfix/pr-884

fix: remove invasive settings (backport #884)
This commit is contained in:
Shariq Ansari 2025-06-02 19:20:57 +05:30 committed by GitHub
commit 815d807fcb
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