mirror of
https://github.com/lukevella/rallly.git
synced 2025-04-28 17:56:37 +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,13 +52,15 @@ export function PostHogProvider(props: PostHogProviderProps) {
|
|||
usePostHogPageView();
|
||||
|
||||
useMount(() => {
|
||||
posthog.identify(user.id, {
|
||||
email: user.email,
|
||||
name: user.name,
|
||||
tier: user.tier,
|
||||
timeZone: user.timeZone,
|
||||
locale: user.locale,
|
||||
});
|
||||
if (user.email) {
|
||||
posthog.identify(user.id, {
|
||||
email: user.email,
|
||||
name: user.name,
|
||||
tier: user.tier,
|
||||
timeZone: user.timeZone,
|
||||
locale: user.locale,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return <Provider client={posthog}>{props.children}</Provider>;
|
||||
|
|
Loading…
Add table
Reference in a new issue