mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-31 01:36:23 +02:00
📈 Set name and email on login and register events (#1210)
Signed-off-by: Luke Vella <me@lukevella.com>
This commit is contained in:
parent
ffb4922084
commit
c126cbdda1
2 changed files with 12 additions and 2 deletions
|
@ -70,7 +70,12 @@ export const RegisterForm = () => {
|
|||
|
||||
queryClient.invalidate();
|
||||
|
||||
posthog?.identify(res.user.id);
|
||||
posthog?.identify(res.user.id, {
|
||||
$set: {
|
||||
email: res.user.email,
|
||||
name: res.user.name,
|
||||
},
|
||||
});
|
||||
|
||||
signIn("registration-token", {
|
||||
token,
|
||||
|
|
|
@ -28,7 +28,12 @@ export const LoginPage = ({ magicLink, email }: PageProps) => {
|
|||
const updatedSession = await session.update();
|
||||
if (updatedSession) {
|
||||
// identify the user in posthog
|
||||
posthog?.identify(updatedSession.user.id);
|
||||
posthog?.identify(updatedSession.user.id, {
|
||||
$set: {
|
||||
email: updatedSession.user.email,
|
||||
name: updatedSession.user.name,
|
||||
},
|
||||
});
|
||||
|
||||
await trpcUtils.invalidate();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue