chore: add persistence localStorage

This commit is contained in:
Faisal Amir 2024-11-20 22:39:33 +07:00 committed by Louis
parent a87b6333c3
commit 1a59b8cecb

View File

@ -7,6 +7,7 @@ if (typeof window !== 'undefined') {
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, { posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, {
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST, api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
person_profiles: 'identified_only', // or 'always' to create profiles for anonymous users as well person_profiles: 'identified_only', // or 'always' to create profiles for anonymous users as well
persistence: 'localStorage',
}) })
} }
export function CSPostHogProvider({ children }) { export function CSPostHogProvider({ children }) {