fix: fix missing userId in segment page event call on welcome page (#784)

This commit is contained in:
Shahbaz Shabbir
2023-03-20 18:17:57 +05:00
committed by GitHub
parent 145234c5c3
commit 6525c66600

View File

@@ -64,13 +64,13 @@ const ProgressiveProfiling = (props) => {
if (registrationResponse) {
setRegistrationResult(registrationResponse);
sendPageEvent('login_and_registration', 'welcome');
}
}, [DASHBOARD_URL, registrationResponse]);
useEffect(() => {
if (registrationResponse && authenticatedUser?.userId) {
identifyAuthenticatedUser(authenticatedUser.userId);
sendPageEvent('login_and_registration', 'welcome');
}
}, [authenticatedUser, registrationResponse]);