From e11af8d2c8e0d00d1de1e9d9c71704812aed1df5 Mon Sep 17 00:00:00 2001 From: zahlekhan Date: Fri, 31 Jul 2026 16:39:45 +0530 Subject: [PATCH] Restore PostHog session recording --- docs/lib/analytics.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/lib/analytics.ts b/docs/lib/analytics.ts index a850389f8..2d9e3c1d3 100644 --- a/docs/lib/analytics.ts +++ b/docs/lib/analytics.ts @@ -1,15 +1,17 @@ -type PostHog = (typeof import("posthog-js/dist/module.slim"))["default"]; +type PostHog = (typeof import("posthog-js"))["default"]; let posthogPromise: Promise | undefined; export function loadPostHog(): Promise { - posthogPromise ??= import("posthog-js/dist/module.slim").then(({ default: posthog }) => { + posthogPromise ??= import("posthog-js").then(({ default: posthog }) => { posthog.init("phc_3OLW53x09ZTVZSV6BEpj5uycj3ooqR6KOemOjx04e3D", { api_host: "https://dgoeivjus9jfp.cloudfront.net", capture_pageview: "history_change", advanced_disable_flags: true, - disable_external_dependency_loading: true, - disable_session_recording: true, + disable_session_recording: false, + session_recording: { + sampleRate: 0.1, + }, disable_surveys: true, });