Skip to content

Commit ee7cb34

Browse files
authored
enable cookieless tracking
Signed-off-by: Ashutosh Tripathi <[email protected]>
1 parent 769e4c0 commit ee7cb34

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/providers.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { PostHogProvider } from 'posthog-js/react'
44

55
if (typeof window !== 'undefined') {
66
posthog.init(process.env.NEXT_PUBLIC_POSTHOG_KEY, {
7-
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST
7+
api_host: process.env.NEXT_PUBLIC_POSTHOG_HOST,
8+
persistence: 'memory' //enables cookieless tracking
89
})
910
}
1011

1112
export function PHProvider({ children }) {
1213
return <PostHogProvider client={posthog}>{children}</PostHogProvider>
13-
}
14+
}

0 commit comments

Comments
 (0)