Skip to content

Commit

Permalink
Enable posthog again (#1146)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev authored Dec 11, 2024
1 parent 57149eb commit 21bf378
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/keychain/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ function Home() {
const posthog = usePostHog();

useEffect(() => {
if (context?.origin && !context.origin.includes("localhost")) {
if (
typeof window !== "undefined" &&
!window.location.hostname.includes("localhost")
) {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY!, {
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
person_profiles: "always",
Expand Down

0 comments on commit 21bf378

Please sign in to comment.