fix: pass user id as string in optimizely track event (#794)

Co-authored-by: Syed Sajjad  Hussain Shah <syed.sajjad@H7FKF7K6XD.local>
This commit is contained in:
Syed Sajjad Hussain Shah
2023-03-28 15:15:38 +05:00
committed by GitHub
parent bf650e6d4c
commit 94151c2668
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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);