Skip to content

Commit 8f7bf45

Browse files
msohailhussainmjc1283
authored andcommitted
fix(nullattributes): track and activate should not remove null attributes. (#168)
1 parent c41493e commit 8f7bf45

File tree

1 file changed

+2
-6
lines changed
  • packages/optimizely-sdk/lib/optimizely

1 file changed

+2
-6
lines changed

packages/optimizely-sdk/lib/optimizely/index.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,7 @@ Optimizely.prototype.activate = function (experimentKey, userId, attributes) {
136136
this.logger.log(LOG_LEVEL.DEBUG, shouldNotDispatchActivateLogMessage);
137137
return variationKey;
138138
}
139-
140-
// remove null values from attributes
141-
attributes = this.__filterEmptyValues(attributes);
142-
139+
143140
this._sendImpressionEvent(experimentKey, variationKey, userId, attributes);
144141

145142
return variationKey;
@@ -238,8 +235,7 @@ Optimizely.prototype.track = function(eventKey, userId, attributes, eventTags) {
238235
return;
239236
}
240237

241-
// remove null values from attributes and eventTags
242-
attributes = this.__filterEmptyValues(attributes);
238+
// remove null values from eventTags
243239
eventTags = this.__filterEmptyValues(eventTags);
244240

245241
var conversionEventOptions = {

0 commit comments

Comments
 (0)