From 94151c26682f8628d2da07015c13fa2c63b226ff Mon Sep 17 00:00:00 2001 From: Syed Sajjad Hussain Shah <52817156+syedsajjadkazmii@users.noreply.github.com> Date: Tue, 28 Mar 2023 15:15:38 +0500 Subject: [PATCH] fix: pass user id as string in optimizely track event (#794) Co-authored-by: Syed Sajjad Hussain Shah --- src/progressive-profiling/ProgressiveProfiling.jsx | 2 +- src/recommendations/optimizelyExperiment.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/progressive-profiling/ProgressiveProfiling.jsx b/src/progressive-profiling/ProgressiveProfiling.jsx index 3d6f0e24..aa0abcfb 100644 --- a/src/progressive-profiling/ProgressiveProfiling.jsx +++ b/src/progressive-profiling/ProgressiveProfiling.jsx @@ -83,7 +83,7 @@ const ProgressiveProfiling = (props) => { const showRecommendations = variation === RECOMMENDATIONS_EXP_VARIATION; trackRecommendationsGroup(variation, authenticatedUser.userId); - trackRecommendationViewedOptimizely(authenticatedUser.userId); + trackRecommendationViewedOptimizely(userIdStr); setShowRecommendationsPage(showRecommendations); if (!showRecommendations) { trackRecommendationsViewed([], true, authenticatedUser.userId); diff --git a/src/recommendations/optimizelyExperiment.js b/src/recommendations/optimizelyExperiment.js index aec3b7a0..8bb4e0e0 100644 --- a/src/recommendations/optimizelyExperiment.js +++ b/src/recommendations/optimizelyExperiment.js @@ -12,7 +12,7 @@ export const eventNames = { * Activate the post registration recommendations optimizely experiment * and return the true if the user is in variation else false. * @param {String} userId user id of authenticated user. - * @return {boolean} true if the user is in variation else false + * @return {string} true if the user is in variation else false */ const activateRecommendationsExperiment = (userId) => optimizelyInstance.activate(RECOMMENDATIONS_EXP_KEY, userId);