mirror of
https://github.com/lukevella/rallly.git
synced 2025-08-06 09:59:00 +02:00
📈 Only create person profile for logged in user
This commit is contained in:
parent
309820f072
commit
6b1e2f9c49
1 changed files with 9 additions and 7 deletions
|
@ -52,6 +52,7 @@ export function PostHogProvider(props: PostHogProviderProps) {
|
||||||
usePostHogPageView();
|
usePostHogPageView();
|
||||||
|
|
||||||
useMount(() => {
|
useMount(() => {
|
||||||
|
if (user.email) {
|
||||||
posthog.identify(user.id, {
|
posthog.identify(user.id, {
|
||||||
email: user.email,
|
email: user.email,
|
||||||
name: user.name,
|
name: user.name,
|
||||||
|
@ -59,6 +60,7 @@ export function PostHogProvider(props: PostHogProviderProps) {
|
||||||
timeZone: user.timeZone,
|
timeZone: user.timeZone,
|
||||||
locale: user.locale,
|
locale: user.locale,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return <Provider client={posthog}>{props.children}</Provider>;
|
return <Provider client={posthog}>{props.children}</Provider>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue