diff --git a/docs/src/components/InstallBlock/index.js b/docs/src/components/InstallBlock/index.js index ad84b5222..ec91c8e7d 100644 --- a/docs/src/components/InstallBlock/index.js +++ b/docs/src/components/InstallBlock/index.js @@ -6,7 +6,11 @@ export default function InstallBlock() { return ( Loading...}> {() => { - const distinct_id = window.posthog.get_distinct_id() + if (window.posthog && typeof window.posthog.get_distinct_id === "function") { + const distinct_id = window.posthog.get_distinct_id() + } else { + const distinct_id = "posthog-blocked" + } return (