From d54fdbf84f5068f717fc3e88b538c2c393a5a5de Mon Sep 17 00:00:00 2001 From: Shahbaz Shabbir <32649010+shahbaz-arbisoft@users.noreply.github.com> Date: Mon, 10 Apr 2023 17:15:03 +0500 Subject: [PATCH] fix: issue of missing user_id on welcome page events (#828) --- src/progressive-profiling/ProgressiveProfiling.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/progressive-profiling/ProgressiveProfiling.jsx b/src/progressive-profiling/ProgressiveProfiling.jsx index cefd5ad0..54e6be4c 100644 --- a/src/progressive-profiling/ProgressiveProfiling.jsx +++ b/src/progressive-profiling/ProgressiveProfiling.jsx @@ -70,11 +70,11 @@ const ProgressiveProfiling = (props) => { }, [DASHBOARD_URL, registrationResponse]); useEffect(() => { - if (registrationResponse && authenticatedUser?.userId) { + if (ready && authenticatedUser?.userId) { identifyAuthenticatedUser(authenticatedUser.userId); sendPageEvent('login_and_registration', 'welcome'); } - }, [authenticatedUser, registrationResponse]); + }, [authenticatedUser, ready]); useEffect(() => { if (registrationResponse && authenticatedUser?.userId) {