You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+57Lines changed: 57 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,63 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
8
8
## [Unreleased]
9
9
10
+
## [5.0.0] - January 19, 2024
11
+
12
+
### New Features
13
+
14
+
The 5.0.0 release introduces a new primary feature, [Advanced Audience Targeting]( https://docs.developers.optimizely.com/feature-experimentation/docs/optimizely-data-platform-advanced-audience-targeting) enabled through integration with [Optimizely Data Platform (ODP)](https://docs.developers.optimizely.com/optimizely-data-platform/docs) ([#765](https://github.com/optimizely/javascript-sdk/pull/765), [#775](https://github.com/optimizely/javascript-sdk/pull/775), [#776](https://github.com/optimizely/javascript-sdk/pull/776), [#777](https://github.com/optimizely/javascript-sdk/pull/777), [#778](https://github.com/optimizely/javascript-sdk/pull/778), [#786](https://github.com/optimizely/javascript-sdk/pull/786), [#789](https://github.com/optimizely/javascript-sdk/pull/789), [#790](https://github.com/optimizely/javascript-sdk/pull/790), [#797](https://github.com/optimizely/javascript-sdk/pull/797), [#799](https://github.com/optimizely/javascript-sdk/pull/799), [#808](https://github.com/optimizely/javascript-sdk/pull/808)).
15
+
16
+
You can use ODP, a high-performance [Customer Data Platform (CDP)](https://www.optimizely.com/optimization-glossary/customer-data-platform/), 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.
17
+
18
+
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.
19
+
20
+
This version includes the following changes:
21
+
22
+
- New API added to `OptimizelyUserContext`:
23
+
24
+
- `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.
25
+
26
+
- When an `OptimizelyUserContext` is created, the SDK will automatically send an identify request to the ODP server to facilitate observing user activities.
27
+
28
+
- New APIs added to `OptimizelyClient`:
29
+
30
+
- `sendOdpEvent()`: customers can build/send arbitrary ODP events that will bind user identifiers and data to user profiles in ODP.
31
+
32
+
- `createUserContext()` with anonymous user IDs: user-contexts can be created without a userId. The SDK will create and use a persistent `VUID` specific to a device when userId is not provided.
-[Send Optimizely Data Platform data using Advanced Audience Targeting](https://docs.developers.optimizely.com/feature-experimentation/docs/send-odp-data-using-advanced-audience-targeting-javascript)
47
+
48
+
Additionally, a handful of major package updates are also included in this release including `murmurhash`, `uuid`, and others. For more information, check out the **Breaking Changes** section below. ([#892](https://github.com/optimizely/javascript-sdk/pull/892), [#762](https://github.com/optimizely/javascript-sdk/pull/762))
49
+
50
+
### Breaking Changes
51
+
-`ODPManager` in the SDK is enabled by default. Unless an ODP account is integrated into the Optimizely projects, most `ODPManager` functions will be ignored. If needed, `ODPManager` can be disabled when `OptimizelyClient` is instantiated.
52
+
- Updated `murmurhash` dependency to version `2.0.1`.
53
+
- Updated `uuid` dependency to version `9.0.1`.
54
+
- Dropped support for the following browser versions.
55
+
- All versions of Microsof Internet Explorer.
56
+
- Chrome versions earlier than `102.0`.
57
+
- Microsoft Edge versions earlier than `84.0`.
58
+
- Firefox versions earlier than `91.0`.
59
+
- Opera versions earlier than `76.0`.
60
+
- Safari versions earlier than `13.0`.
61
+
- Dropped support for Node JS versions earlier than `16`.
62
+
63
+
## Changed
64
+
- Updated `createUserContext`'s `userId` parameter to be optional due to the Browser variation's use of the new `vuid` field. Note: The Node variation of the SDK does **not** use the new `vuid` field and you should pass in a `userId` when within the context of the Node variant.
Copy file name to clipboardExpand all lines: README.md
+26-68Lines changed: 26 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,17 @@
8
8
9
9
This repository houses the JavaScript SDK for use with Optimizely Feature Experimentation and Optimizely Full Stack (legacy).
10
10
11
-
Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/welcome).
11
+
Optimizely Feature Experimentation is an A/B testing and feature management tool for product development teams that enables you to experiment at every step. Using Optimizely Feature Experimentation allows for every feature on your roadmap to be an opportunity to discover hidden insights. Learn more at [Optimizely.com](https://www.optimizely.com/products/experiment/feature-experimentation/), or see the [developer documentation](https://docs.developers.optimizely.com/feature-experimentation/docs/introduction).
12
12
13
13
Optimizely Rollouts is [free feature flags](https://www.optimizely.com/free-feature-flagging/) for development teams. You can easily roll out and roll back features in any application without code deploys, mitigating risk for every feature on your roadmap.
14
14
15
15
---
16
16
17
17
## Get Started
18
18
19
-
> For **Browser** applications, refer to the [JavaScript SDK's developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/javascript-sdk) for detailed instructions on getting started with using the SDK within client-side applications.
19
+
> For **Browser** applications, refer to the [JavaScript SDK's developer documentation](https://docs.developers.optimizely.com/feature-experimentation/docs/javascript-sdk) for detailed instructions on getting started with using the SDK within client-side applications.
20
20
21
-
> For **React** applications, refer to the [React SDK developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/javascript-react-sdk).
22
-
23
-
> For **React Native** applications, refer to the [JavaScript (React Native) variant of the developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/javascript-react-native-sdk).
24
-
25
-
> For **Node.js** applications, refer to the [JavaScript (Node) variant of the developer documentation](https://docs.developers.optimizely.com/experimentation/v4.0.0-full-stack/docs/javascript-node-sdk).
21
+
> For **Node.js** applications, refer to the [JavaScript (Node) variant of the developer documentation](https://docs.developers.optimizely.com/feature-experimentation/docs/javascript-node-sdk).
26
22
27
23
> For **Edge Functions**, we provide starter kits that utilize the Optimizely JavaScript SDK for the following platforms:
> Note: These starter kits use the **Lite** variant of the JavaScript SDK which excludes the datafile manager and event processor packages.
30
+
> Note: We recommend using the **Lite** version of the sdk for edge platforms. These starter kits also use the **Lite** variant of the JavaScript SDK which excludes the datafile manager and event processor packages.
35
31
36
32
### Prerequisites
37
33
38
-
Ensure the SDK supports all of the platforms you're targeting. In particular, the SDK targets any ES5-compliant JavaScript environment. We officially support:
39
-
- Node.js >= 8.0.0. By extension, environments like AWS Lambda, Google Cloud Functions, and Auth0 Webtasks are supported as well. Older Node.js releases likely work too (try `npm test` to validate for yourself), but are not formally supported.
40
-
-[Modern Web Browsers, such as IE 10+, Firefox 21+, Safari 6+, and Chrome 23+](https://caniuse.com/#feat=es5)
34
+
Ensure the SDK supports all of the platforms you're targeting. In particular, the SDK targets modern ES5-compliant JavaScript environment. We officially support:
35
+
- Node.js >= 16.0.0. By extension, environments like AWS Lambda, Google Cloud Functions, and Auth0 Webtasks are supported as well. Older Node.js releases likely work too (try `npm test` to validate for yourself), but are not formally supported.
36
+
- Modern Web Browsers, such as Microsoft Edge 84+, Firefox 91+, Safari 13+, and Chrome 102+, Opera 76+
41
37
42
38
In addition, other environments are likely compatible but are not formally supported including:
43
39
- Progressive Web Apps, WebViews, and hybrid mobile apps like those built with React Native and Apache Cordova.
@@ -48,44 +44,8 @@ In addition, other environments are likely compatible but are not formally suppo
48
44
49
45
* JavaScript (Browser): Modern web browser that is ES5-compliant.
50
46
51
-
* JavaScript (Node): Node 8.0+
52
-
53
-
* The following peer dependencies may be required for use in production:
and remove the self (`@optimizely/optimizely-sdk`) entry.
47
+
* JavaScript (Node): Node 16.0.0+
87
48
88
-
> Note: The `jq` command line tool is required to run the above script. You may install `jq` to your environment by using Homebrew on MacOS using the command `brew install jq`. For Windows users, please visit the [JQ GitHub repository](https://github.com/stedolan/jq) to learn more.
89
49
90
50
### Install the SDK
91
51
@@ -116,7 +76,7 @@ See the [Optimizely Feature Experimentation developer documentation for JavaScri
116
76
117
77
### Initialization (Browser)
118
78
119
-
The package's entry point is a CommonJS module, which can be used directly in environments which support it (e.g., Node.js, or loaded in a browser via Browserify or RequireJS). Additionally, for ease of use during initial evaluations you can include a standalone bundle of the SDK in your web page by fetching it from [unpkg](https://unpkg.com/):
79
+
The package has different entry points for different environments. The browser entry point is an ES module, which can be used with an appropriate bundler like **Webpack**or **Rollup**. Additionally, for ease of use during initial evaluations you can include a standalone umd bundle of the SDK in your web page by fetching it from [unpkg](https://unpkg.com/):
// Create the Optimizely user context, make decisions, and more here!
102
+
}
103
+
});
142
104
```
143
105
144
106
Regarding `EventDispatcher`s: In Node.js and browser environments, the default `EventDispatcher` is powered by the [`http/s`](https://nodejs.org/api/http.html) modules and by [`XMLHttpRequest`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#Browser_compatibility), respectively. In all other environments, you must supply your own `EventDispatcher`.
@@ -149,20 +111,22 @@ See the [Optimizely Feature Experimentation developer documentation for JavaScri
149
111
150
112
### Initialization (Node)
151
113
152
-
The package's entry point is a CommonJS module, which can be used directly in environments which support it (e.g., Node.js, or loaded in a browser via Browserify or RequireJS). Additionally, for ease of use during initial evaluations you can include a standalone bundle of the SDK in your web page by fetching it from [unpkg](https://unpkg.com/):
114
+
The package has different entry points for different environments. The node entry point is CommonJS module.
// Create the Optimizely user context, make decisions, and more here!
128
+
}
129
+
});
166
130
```
167
131
168
132
Regarding `EventDispatcher`s: In Node.js environment, the default `EventDispatcher` is powered by the [`http/s`](https://nodejs.org/api/http.html) module.
@@ -207,15 +171,9 @@ For more information regarding contributing to the Optimizely JavaScript SDK, pl
207
171
208
172
## Special Notes
209
173
210
-
### Migrating from 1.x.x
211
-
212
-
This version represents a major version change and, as such, introduces some breaking changes:
213
-
214
-
- The Node.js SDK is now combined with the JavaScript SDK. We now have just one package, `@optimizely/optimizely-sdk`, that works in many JavaScript environments.
215
-
216
-
- We no longer support Node.js < 4.0.0, which collectively [reached end-of-life](https://github.com/nodejs/Release#end-of-life-releases) on 2016-12-31.
174
+
### Migrating from 4.x.x
217
175
218
-
- You will no longer be able to pass in `revenue` value as a stand-alone argument to the `track` call. Instead you will need to pass it as an entry in the [`eventTags`](https://developers.optimizely.com/x/solutions/sdks/reference/index.html?language=javascript#event-tags).
176
+
This version represents a major version change and, as such, introduces some breaking changes. Please refer to the [Changelog](CHANGELOG.md#500---january-19-2024) for more details.
0 commit comments