mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 10:19:51 -06:00
feat: add onboarding responses to user profiling in posthog (#2261)
This commit is contained in:
committed by
GitHub
parent
3ca6ec8b56
commit
ae3f1885c2
@@ -30,7 +30,12 @@ export default function PosthogIdentify({
|
||||
|
||||
useEffect(() => {
|
||||
if (posthogEnabled && session.user && posthog) {
|
||||
posthog.identify(session.user.id, { name: session.user.name, email: session.user.email });
|
||||
posthog.identify(session.user.id, {
|
||||
name: session.user.name,
|
||||
email: session.user.email,
|
||||
role: session.user.role,
|
||||
objective: session.user.objective,
|
||||
});
|
||||
if (environmentId) {
|
||||
posthog.group("environment", environmentId, { name: environmentId });
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ const responseSelection = {
|
||||
imageUrl: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
role: true,
|
||||
onboardingCompleted: true,
|
||||
twoFactorEnabled: true,
|
||||
identityProvider: true,
|
||||
|
||||
@@ -32,6 +32,7 @@ export const ZUser = z.object({
|
||||
createdAt: z.date(),
|
||||
updatedAt: z.date(),
|
||||
onboardingCompleted: z.boolean(),
|
||||
role: ZRole.nullable(),
|
||||
objective: ZUserObjective.nullable(),
|
||||
notificationSettings: ZUserNotificationSettings,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user