diff --git a/packages/optimizely-sdk/lib/optimizely/index.js b/packages/optimizely-sdk/lib/optimizely/index.js index 01719e5ea..8c81d2347 100644 --- a/packages/optimizely-sdk/lib/optimizely/index.js +++ b/packages/optimizely-sdk/lib/optimizely/index.js @@ -136,10 +136,7 @@ Optimizely.prototype.activate = function (experimentKey, userId, attributes) { this.logger.log(LOG_LEVEL.DEBUG, shouldNotDispatchActivateLogMessage); return variationKey; } - - // remove null values from attributes - attributes = this.__filterEmptyValues(attributes); - + this._sendImpressionEvent(experimentKey, variationKey, userId, attributes); return variationKey; @@ -238,8 +235,7 @@ Optimizely.prototype.track = function(eventKey, userId, attributes, eventTags) { return; } - // remove null values from attributes and eventTags - attributes = this.__filterEmptyValues(attributes); + // remove null values from eventTags eventTags = this.__filterEmptyValues(eventTags); var conversionEventOptions = {