Releases: optimizely/javascript-sdk
Releases · optimizely/javascript-sdk
Release 2.0.1
April 16th, 2018
- Improve browser entry point by pointing to the browser index file instead of the webpack-compiled bundle. (@DullReferenceException in #88)
Release 2.0.0
April 11th, 2018
This major release of the Optimizely SDK introduces APIs for Feature Management. It also introduces some breaking changes listed below.
New Features
- Introduces the
isFeatureEnabled
API to determine whether to show a feature to a user or not.
var enabled = optimizelyClient.isFeatureEnabled('my_feature_key', 'user_1', userAttributes);
- You can also get all the enabled features for the user by calling the following method which returns a list of strings representing the feature keys:
var enabledFeatures = optimizelyClient.getEnabledFeatures('user_1', userAttributes);
- Introduces Feature Variables to configure or parameterize your feature. There are four variable types:
Integer
,String
,Double
,Boolean
.
var stringVariable = optimizelyClient.getFeatureVariableString('my_feature_key', 'string_variable_key', 'user_1');
var integerVariable = optimizelyClient.getFeatureVariableInteger('my_feature_key', 'integer_variable_key', 'user_1');
var doubleVariable = optimizelyClient.getFeatureVariableDouble('my_feature_key', 'double_variable_key', 'user_1');
var booleanVariable = optimizelyClient.getFeatureVariableBoolean('my_feature_key', 'boolean_variable_key', 'user_1');
Breaking changes
- The
track
API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry of the event tags map. The key for the revenue tag isrevenue
and will be treated by Optimizely as the key for analyzing revenue data in results.
var eventTags = {
'revenue': 1200
};
optimizelyClient.track('event_key', 'user_id', userAttributes, eventTags);
- The package name has changed from
optimizely-client-sdk
tooptimizely-sdk
as we have consolidated both Node and JavaScript SDKs into one.
Release 2.0.0-beta1
March 29th, 2018
This major release of the Optimizely SDK introduces APIs for Feature Management. It also introduces some breaking changes listed below.
New Features
- Introduces the
isFeatureEnabled
API to determine whether to show a feature to a user or not.
var enabled = optimizelyClient.isFeatureEnabled('my_feature_key', 'user_1', userAttributes);
- You can also get all the enabled features for the user by calling the following method which returns a list of strings representing the feature keys:
var enabledFeatures = optimizelyClient.getEnabledFeatures('user_1', userAttributes);
- Introduces Feature Variables to configure or parameterize your feature. There are four variable types:
Integer
,String
,Double
,Boolean
.
var stringVariable = optimizelyClient.getFeatureVariableString('my_feature_key', 'string_variable_key', 'user_1');
var integerVariable = optimizelyClient.getFeatureVariableInteger('my_feature_key', 'integer_variable_key', 'user_1');
var doubleVariable = optimizelyClient.getFeatureVariableDouble('my_feature_key', 'double_variable_key', 'user_1');
var booleanVariable = optimizelyClient.getFeatureVariableBoolean('my_feature_key', 'boolean_variable_key', 'user_1');
Breaking changes
- The
track
API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry of the event tags map. The key for the revenue tag isrevenue
and will be treated by Optimizely as the key for analyzing revenue data in results.
var eventTags = {
'revenue': 1200
};
optimizelyClient.track('event_key', 'user_id', userAttributes, eventTags);
- The package name has changed from
optimizely-client-sdk
tooptimizely-sdk
as we have consolidated both Node and JavaScript SDKs into one.
Release 1.6.0
- Bump optimizely-server-sdk to version 1.5.0, which includes:
- Implemented IP anonymization.
- Implemented bucketing IDs.
- Implemented notification listeners.
Release 1.5.1
- Bump optimizely-server-sdk to version 1.4.2, which includes:
- Bug fix to filter out undefined values in attributes and event tags
- Remove a duplicated test
Release 1.5.0
- Bump optimizely-server-sdk to version 1.4.0, which includes:
- Add support for numeric metrics.
- Add getForcedVariation and setForcedVariation methods for client-side variation setting
- Bug fix for filtering out null attribute and event tag values
Release 1.4.3
- Default skipJSONValidation to true
- Bump optimizely-server-sdk to version 1.3.3, which includes:
- Removed JSON Schema Validator from Optimizely constructor
- Updated SDK to use new event endpoint
- Minor bug fixes
Release 1.4.2
- Minor performance improvements.
Release 1.4.1
- Switched to karma/browserstack for cross-browser testing
- Removed es6-promise
- Bump optimizely-server-sdk to version 1.3.1, which includes:
- Minor performance improvements.
Release 1.3.5
- Bump optimizely-server-sdk to version 1.2.3, which includes:
- Switched to json-schema library which has a smaller footprint.
- Refactored order of bucketing logic.
- Refactor lodash dependencies.
- Fixed error on validation for objects with undefined values for attributes.