Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/optimizely-sdk/lib/core/decision_service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ DecisionService.prototype._getVariationForRollout = function(feature, userId, at
};
}

var bucketingId = this._getBucketingId(userId, attributes);

// The end index is length - 1 because the last experiment is assumed to be
// "everyone else", which will be evaluated separately outside this loop
var endIndex = rollout.experiments.length - 1;
Expand All @@ -401,7 +403,7 @@ DecisionService.prototype._getVariationForRollout = function(feature, userId, at
}

this.logger.log(LOG_LEVEL.DEBUG, sprintf(LOG_MESSAGES.USER_MEETS_CONDITIONS_FOR_TARGETING_RULE, MODULE_NAME, userId, index + 1));
bucketerParams = this.__buildBucketerParams(experiment.key, userId, userId);
bucketerParams = this.__buildBucketerParams(experiment.key, bucketingId, userId);
variationId = bucketer.bucket(bucketerParams);
variation = this.configObj.variationIdMap[variationId];
if (variation) {
Expand Down