- Widen React Native peer dependency version ranges.
- Improve notification center type definitions with strongly-typed listener payloads.
- Added
customHeadersoption todatafileOptionsfor passing custom HTTP headers in datafile requests.
- Fix the EventTags type to allow event properties.
- Fix typo in event.experimentIds field in project config.
client.onReady()always returns false when ODP is off and user id is null bug fix.(#302)
isClientReadylogic adjustment.(#285)trackmethod overrideAttribute bug fix.(#287)- "
OptimizelyProviderresets previously set user" bug fix.(#292)
- Multiple instances of the Logger make the log system unconfigurable - bug fix. (#276)
clientReadyis true even though internal client promise returnssuccess == falsebug fix(#273)useDecisionhook set the update listener on overy render bug fix(#273)setForcedDecisiondoes not reflect the changes in optmizely instance anduseDecisionhook bug fix(#274)
- The new
useTrackEventhook is now available for tracking events within functional components. This hook offers all the existing track event functionalities provided by the SDK. (#268)
- JS SDK bump up for react native polyfill support (#266)
- ODP integration error. (#262)
- Error initializing client. The core client or user promise(s) rejected. (#255)
- Unable to determine if feature "{your-feature-key}" is enabled because User ID is not set(#255)
- Bumped Optimizely JS SDK version in use (#255)
- Resolve dependabot dependency vulnerabilities (#245, #247, #248, #251, #253)
- Add node versions during testing (#249)
The 3.0.0 release introduces a new primary feature, Advanced Audience Targeting enabled through integration with Optimizely Data Platform (ODP) ( #229, #214, #213, #212, #208, #207, #206, #205, #201, #200, #199)
You can use ODP, a high-performance Customer Data Platform (CDP), to easily create complex real-time segments (RTS) using first-party and 50+ third-party data sources out of the box. You can create custom schemas that support the user attributes important for your business, and stitch together user behavior done on different devices to better understand and target your customers for personalized user experiences. ODP can be used as a single source of truth for these segments in any Optimizely or 3rd party tool.
With ODP accounts integrated into Optimizely projects, you can build audiences using segments pre-defined in ODP. The SDK will fetch the segments for given users and make decisions using the segments. For access to ODP audience targeting in your Feature Experimentation account, please contact your Customer Success Manager.
This release leverages the Optimizely JavaScript SDK 5+
This version includes the following changes:
-
New APIs added to
ReactSDKClient:-
fetchQualifiedSegments(): this API will retrieve user segments from the ODP server. The fetched segments will be used for audience evaluation. The fetched data will be stored in the local cache to avoid repeated network delays. -
getUserContext(): get the currentOptimizelyUserContextobject in use at the React SDK level. -
getVuid(): provides access to the anonymous client-side visitor ID (VUID) generated by the JS SDK. This ID is used to identify unique visitors in Optimizely Results in the absence of a standard user ID. -
sendOdpEvent(): customers can build/send arbitrary ODP events that will bind user identifiers and data to user profiles in ODP.
-
For details, refer to our documentation pages:
- Dropped support for the following browser versions.
- All versions of Microsoft Internet Explorer.
- Chrome versions earlier than
102.0. - Microsoft Edge versions earlier than
84.0. - Firefox versions earlier than
91.0. - Opera versions earlier than
76.0. - Safari versions earlier than
13.0.
- Dropped support for Node JS versions earlier than
16.
- Updated
@optimizely/optimizely-sdkto version5.0.0(#230). - Removed use of deprecated
@optimizely/js-sdk-*packages. - Minor version bumps to dependencies.
- Updated
OptimizelyProviderto (#229)- correctly adhere to optional
userId?anduser?interface fields, using theDefaultUserto signal to client-side contexts to use the newvuididentifier. - correctly use of the correct React lifecyle methods.
- correctly adhere to optional
- Tag release correctly during publishing
- Updated datafile variable in README
- AAT gap fill
- Rendering
defaultOptimizelyVariation when not last - OptimizelyVariation with default and variation props set
The 3.0.0-beta release introduces a new primary feature, Advanced Audience Targeting enabled through integration with Optimizely Data Platform (ODP) (#214, #213, #212, #208, #207, #206, #205, #201, #200, #199)
You can use ODP, a high-performance Customer Data Platform (CDP), to easily create complex real-time segments (RTS) using first-party and 50+ third-party data sources out of the box. You can create custom schemas that support the user attributes important for your business, and stitch together user behavior done on different devices to better understand and target your customers for personalized user experiences. ODP can be used as a single source of truth for these segments in any Optimizely or 3rd party tool.
With ODP accounts integrated into Optimizely projects, you can build audiences using segments pre-defined in ODP. The SDK will fetch the segments for given users and make decisions using the segments. For access to ODP audience targeting in your Feature Experimentation account, please contact your Customer Success Manager.
This release leverages the Optimizely JavaScript SDK beta5+
This version includes the following changes:
-
New API added to
OptimizelyUserContext:-
fetchQualifiedSegments(): this API will retrieve user segments from the ODP server. The fetched segments will be used for audience evaluation. The fetched data will be stored in the local cache to avoid repeated network delays. -
When an
OptimizelyUserContextis created, the SDK will automatically send an identify request to the ODP server to facilitate observing user activities.
-
-
New APIs added to
OptimizelyClient:-
sendOdpEvent(): customers can build/send arbitrary ODP events that will bind user identifiers and data to user profiles in ODP. -
createUserContext()with anonymous user IDs: user-contexts can be created without a userId. The SDK will create and use a persistentVUIDspecific to a device when userId is not provided.
-
For details, refer to our documentation pages:
- Dropped support for the following browser versions.
- All versions of Microsoft Internet Explorer.
- Chrome versions earlier than
102.0. - Microsoft Edge versions earlier than
84.0. - Firefox versions earlier than
91.0. - Opera versions earlier than
76.0. - Safari versions earlier than
13.0.
- Dropped support for Node JS versions earlier than
14.
- Updated
createUserContext'suserIdparameter to be optional due to the Browser variation's use of the newvuidfield.
- We updated our README.md and other non-functional code to reflect that this SDK supports both Optimizely Feature Experimentation and Optimizely Full Stack. (#190).
- Fixed Redundant activate calls in useExperiment hook for one scenario.
- addresses issues #152 and #134: Gracefully returns pessimistic default values when hooks fail instead of throwing an error.
- fixed issue #156 - Added children prop to make the SDK compatible with React 18(#158).
- Updates React SDK to use React 18 and fixed related typescript issues (#159).
- Replaces
enzymewithreact testing libraryto make unit tests work with React 18 (#159).
-
fixed issue #49: Return type of
createInstancewasOptimizelyReactSDKClientwhich is the implementation class. Changed it to theReactSDKClientinterface instead (#148). -
fixed issue #121:
ActivateListenerPayloadandTrackListenerPayloadtypes were exported from@optimizely/optimizely-sdkbut were missing from@optimizely/react-sdkexports. (#150).
- Fixed issue #134 of the React SDK crashing when the internal Optimizely client returns as a null value. PR #149
- Add a set of new APIs for overriding and managing user-level flag, experiment and delivery rule decisions. These methods can be used for QA and automated testing purposes. They are an extension of the ReactSDKClient interface (#133):
- setForcedDecision
- getForcedDecision
- removeForcedDecision
- removeAllForcedDecisions
- Updated
useDecisionhook to auto-update and reflect changes when forced decisions are set and removed (#133). - For details, refer to our documentation pages: ReactSDKClient, Forced Decision methods and useDecision hook.
- Fixed the SDK to render the correct decision on first render when initialized synchronously using a datafile (#125).
- Fixed the redundant re-rendering when SDK is initialized with both datafile and SDK key (#125).
- Updated
@optimizely/js-sdk-loggingto 0.3.1 (#140).
- Fixed the SDK to render the correct decision on first render when initialized synchronously using a datafile (#125).
- Fixed the redundant re-rendering when SDK is initialized with both datafile and SDK key (#125).
Upgrade @optimizely/optimizely-sdk to 4.7.0:
- Added new public properties to
OptimizelyConfig. See @optimizely/optimizely-sdk Release 4.7.0 for details - Deprecated
OptimizelyFeature.experimentsMapofOptimizelyConfig. See @optimizely/optimizely-sdk Release 4.7.0 for details - For more information, refer to our documentation page: https://docs.developers.optimizely.com/full-stack/v4.0/docs/optimizelyconfig-react
- Update
VariableValuesObjecttype to handle JSON type variable and avoid TS compiler error when specifying variable type (#118).
- Upgrade
@optimizely/optimizely-sdkto 4.6.2. Fixed incorrect impression event payload in projects containing multiple flags with duplicate key rules. See @optimizely/optimizely-sdk Release 4.6.2 for more details.
- Upgrade
@optimizely/optimizely-sdkto 4.6.1. Fixed serving incorrect variation issue in projects containing multiple flags with same key rules. See @optimizely/optimizely-sdk Release 4.6.1 for more details.
Upgrade @optimizely/optimizely-sdk to 4.6.0
- Added support for multiple concurrent prioritized experiments per flag. See @optimizely/optimizely-sdk Release 4.6.0 for more details.
- Upgrade
@optimizely/optimizely-sdkto 4.5.1 - Added support for new set of decide APIs (#98)
- Introducing
useDecisionhook to retrieve the decision result for a flag key, optionally auto updating that decision based on underlying user or datafile changes (#100, #105) - For details, refer to our documentation page: https://docs.developers.optimizely.com/full-stack/v4.0/docs/javascript-react-sdk
- This version of React SDK depends on 4.4.3 of
@optimizely/optimizely-sdk. The dependency was defined to use the latest available minor version which is no more compatible. Fixed the dependency to use the exact version.
- Always recompute decision after resolution of ready promise (#91)
Upgrade @optimizely/optimizely-sdk to 4.4.3:
- Allowed using
--isolatedModulesflag in TSConfig file by fixing exports in event processor . See Issue #84 and @optimizely/optimizely-sdk Release 4.4.1 for more details. - Added
enabledfield to decision metadata structure to support upcoming application-controlled introduction of tracking for non-experiment Flag decisions. See @optimizely/optimizely-sdk Release 4.4.2 for more details. - Refactored imports in
optimizely-sdkTypeScript type definitions to prevent compilation of TS source code. See @optimizely/optimizely-sdk Release 4.4.2 and @optimizely/optimizely-sdk Release 4.4.3 for more details.
Upgrade @optimizely/optimizely-sdk to 4.4.0:
- Added support for upcoming application-controlled introduction of tracking for non-experiment Flag decisions. See @optimizely/optimizely-sdk Release 4.4.0 for more details.
- Add UMD and System build targets, available at
dist/react-sdk.umd.jsanddist/react-sdk.system.js, respectively (#80)
- Fix
logOnlyEventDispatcherto conform toEventDispatchertype from @optimizely/optimizely-sdk (#81) - Change the file extension of the ES module bundle from .mjs to .es.js. Resolves issues using React SDK with Gatsby (#82).
Upgrade @optimizely/optimizely-sdk to 4.3.4:
- Exported Optimizely Config Entities types from TypeScript type definitions. See @optimizely/optimizely-sdk Release 4.3.3 for more details.
- Fixed return type of
getAllFeatureVariablesmethod in TypeScript type definitions. See @optimizely/optimizely-sdk Release 4.3.2 for more details.
- Fixed return type of
getAllFeatureVariablesmethod in ReactSDKClient (#76)
Upgrade @optimizely/optimizely-sdk to 4.3.1. Added support for version audience evaluation and datafile accessor. See @optimizely/optimizely-sdk Release 4.3.0 for more details.
Upgrade @optimizely/optimizely-sdk to 4.2.1
useExperimentanduseFeaturehooks re-render when override user ID or attributes change(#64)
useExperimentanduseFeaturehooks return up-to-date decision values on the first call after the client is ready (#64)
Upgrade @optimizely/optimizely-sdk to 4.2.1
useExperimentanduseFeaturehooks re-render when override user ID or attributes change(#64)
useExperimentanduseFeaturehooks return up-to-date decision values on the first call after the client is ready (#64)
Upgrade @optimizely/optimizely-sdk to 4.2.0
- Better offline support in React Native apps:
- Persist downloaded datafiles in local storage for use in subsequent SDK initializations
- Persist pending impression & conversion events in local storage
- Fixed log messages for Targeted Rollouts
Upgrade @optimizely/optimizely-sdk to 4.1.0. See @optimizely/optimizely-sdk Release 4.1.0 for more details.
- Add support for JSON feature variables (#53)
- Export
useExperimenthook from this package (#50)
Upgrade @optimizely/optimizely-sdk to 4.0.0. See @optimizely/optimizely-sdk Release 4.0.0 for more details.
-
Changed supported React version to 16.8+
-
@optimizely/optimizely-sdk no longer adds
Promisepolyfill in its browser entry point -
Dropped support for Node.js version <8
-
Refactored
<OptimizelyFeature>to a functional component that uses theuseFeaturehook under the hood. See #32 for more details. -
Refactored
<OptimizelyExperiment>to a functional component that uses theuseExperimenthook under the hood. See #36 for more details. -
Added
useExperimenthook- Can be used to retrieve the variation for an experiment. See #36 for more details.
-
Added
useFeaturehook- Can be used to retrieve the status of a feature flag and its variables. See #28 for more details.
-
Removed lodash dependency
- Exposed the entire context object used by
<OptimizelyProvider>.- Enables support for using APIs which require passing reference to a context object, like
useContext. #27 for more details.
- Enables support for using APIs which require passing reference to a context object, like
- Upgrade
@optimizely/optimizely-sdkto 4.0.0-rc.2. Allow creating multiple instances from the same datafile object. See @optimizely/optimizely-sdk Release 4.0.0-rc.2 for more details.
- Upgrade
@optimizely/optimizely-sdkto 4.0.0-rc.1. Dropped support for Node.js version <8. See @optimizely/optimizely-sdk Release 4.0.0-rc.1 for more details.
- Upgrade
@optimizely/optimizely-sdkto 4.0.0-alpha.1.Promisepolyfill no longer included. See @optimizely/optimizely-sdk Release 4.0.0-alpha.1 for more details.
- Changed supported React version to 16.8+
-
Refactored
<OptimizelyFeature>to a functional component that uses theuseFeaturehook under the hood. See #32 for more details. -
Refactored
<OptimizelyExperiment>to a functional component that uses theuseExperimenthook under the hood. See #36 for more details. -
Added
useExperimenthook- Can be used to retrieve the variation for an experiment. See #36 for more details.
-
Added
useFeaturehook- Can be used to retrieve the status of a feature flag and its variables. See #28 for more details.
- Exposed the entire context object used by
<OptimizelyProvider>.- Enables support for using APIs which require passing reference to a context object, like
useContext. #27 for more details.
- Enables support for using APIs which require passing reference to a context object, like
- Updated minor version of core SDK (
@optimizely/optimizely-sdk) dependency which, for unrecognized events sent via.track(), will impact the log levels in this SDK as well.
- Added a new API to get project configuration static data.
- Call
getOptimizelyConfig()to get a snapshot of project configuration static data. - It returns an
OptimizelyConfiginstance which includes a datafile revision number, all experiments, and feature flags mapped by their key values. - Added caching for
getOptimizelyConfig-OptimizelyConfigobject will be cached and reused for the lifetime of the datafile. - For details, refer to our documentation page: https://docs.developers.optimizely.com/full-stack/docs/optimizelyconfig-react.
- Call
- Javascript SDK Client version was being sent in dispatched events. Changed it to send React SDK client version.
- Updated
@optimizely/optimizely-sdk to 3.3.2.Includes a better default logger for React Native and a fix for an error message logged when a user is bucketed to empty space. - Replaced usage of
react-broadcastwith the native React Context API
Initial release