fix: fix recommendations viewed event count anomly (#787)
Co-authored-by: Syed Sajjad Hussain Shah <syed.sajjad@H7FKF7K6XD.local>
This commit is contained in:
committed by
GitHub
parent
6525c66600
commit
fc37bbec1d
@@ -75,14 +75,14 @@ const ProgressiveProfiling = (props) => {
|
||||
}, [authenticatedUser, registrationResponse]);
|
||||
|
||||
useEffect(() => {
|
||||
if (registrationResponse) {
|
||||
if (registrationResponse && authenticatedUser?.userId) {
|
||||
const queryParams = getAllPossibleQueryParams(registrationResponse.redirectUrl);
|
||||
if (enablePersonalizedRecommendations && !('enrollment_action' in queryParams)) {
|
||||
const userIdStr = authenticatedUser?.userId.toString();
|
||||
const userIdStr = authenticatedUser.userId.toString();
|
||||
const showRecommendations = activateRecommendationsExperiment(userIdStr);
|
||||
setShowRecommendationsPage(showRecommendations);
|
||||
if (!showRecommendations) {
|
||||
trackRecommendationsViewed([], true, authenticatedUser?.userId);
|
||||
trackRecommendationsViewed([], true, authenticatedUser.userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user