31 | This is a sample app demonstrating Segment integration with Braze.
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 | );
43 | }
44 |
45 | export default App;
46 |
--------------------------------------------------------------------------------
/snippets/alternate-push-domain-registration.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Opt-In for Push
4 |
5 |
6 |
7 |
8 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature.yml:
--------------------------------------------------------------------------------
1 | name: ✅ Feature Request
2 | description: Request New SDK Features
3 | title: '[Feature]: '
4 | labels: ["feature-request"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | :point_right: You can also submit feature requests in our [Public Roadmap Portal](https://dashboard.braze.com/resources/roadmap)
10 | - type: textarea
11 | id: problem
12 | attributes:
13 | label: What problem are you facing?
14 | description: Help us understand what you're unable to accomplish, or what's difficult with your integration
15 | placeholder: |
16 | ex: I am unable to accomplish XYZ today, since the SDK does not allow me to...
17 | validations:
18 | required: true
19 | - type: textarea
20 | id: workarounds
21 | attributes:
22 | label: Workarounds
23 | description: Are there any workarounds you can use? How complicated are they?
24 | validations:
25 | required: true
26 | - type: textarea
27 | id: ideal_solution
28 | attributes:
29 | label: Ideal Solution
30 | description: What would your ideal solution look like?
31 | validations:
32 | required: false
33 | - type: textarea
34 | id: other_information
35 | attributes:
36 | label: Other Information
37 | description: Any additional information you'd like to share?
38 | validations:
39 | required: false
40 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2025 Braze, Inc.
2 | All rights reserved.
3 |
4 | * Use of source code or binaries contained within Braze’s SDKS are permitted only to enable use of the Braze platform by current customers of Braze.
5 | * Modification of source code and inclusion in mobile apps or web sites is only permitted provided that all other conditions set forth herein are met.
6 | * Neither the name of Braze nor the names of any of its contributors may be used to endorse or promote products derived from this software without the express prior written permission of Braze.
7 | * Redistribution of source code or binaries is strictly prohibited except with the express prior written permission of Braze. Any such redistribution must retain the above copyright notice, this list of conditions and the following disclaimer.
8 |
9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF THE USER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10 |
--------------------------------------------------------------------------------
/sample-builds/segment/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 | Segment Integration Demo
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/sample-builds/npm/src/App.tsx:
--------------------------------------------------------------------------------
1 | import { useEffect } from "react";
2 |
3 | import {
4 | initialize,
5 | automaticallyShowInAppMessages,
6 | openSession,
7 | getUser
8 | } from "@braze/web-sdk";
9 |
10 | function App() {
11 | useEffect(() => {
12 | initialize("e491231d-c4ae-466d-8f7f-ba8ad308f12a", {
13 | enableLogging: true,
14 | baseUrl: "sdk.iad-01.braze.com",
15 | // Warning: Using the serviceWorkerLocation option limits the scope of push notifications on your site. See
16 | // https://js.appboycdn.com/web-sdk/6.4/doc/module-appboy.html#initialize for more details.
17 | // If in doubt, omit this option and use the default location of /service-worker.js
18 | serviceWorkerLocation: "/service-worker.js",
19 | safariWebsitePushId: "web.com.braze.sample-build"
20 | });
21 | automaticallyShowInAppMessages();
22 | openSession();
23 | getUser()?.setCustomUserAttribute("visited sample-build", new Date());
24 | }, []);
25 |
26 | const handleRegisterPushClick = async () => {
27 | // use webpackExports magic comment to dynamically import while still getting the benefits of tree-shaking
28 | const {
29 | requestPushPermission,
30 | logCustomEvent,
31 | requestImmediateDataFlush
32 | } = await import(
33 | /* webpackExports: ["requestPushPermission", "logCustomEvent", "requestImmediateDataFlush"] */
34 | "@braze/web-sdk"
35 | );
36 | requestPushPermission(() => {
37 | logCustomEvent("send me push");
38 | requestImmediateDataFlush();
39 | });
40 | };
41 |
42 | return (
43 |
44 | This is a sample integration of the Braze Web SDK, with web push
45 | integrated.
46 |
47 |
48 |
49 |
50 | );
51 | }
52 |
53 | export default App;
54 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug.yml:
--------------------------------------------------------------------------------
1 | name: 🐞 Bug report
2 | description: File a Bug Report for unexpected or incorrect SDK Behavior
3 | title: '[Bug]: '
4 | labels: ["bug"]
5 | body:
6 | - type: markdown
7 | attributes:
8 | value: |
9 | Thanks for taking the time to fill out this bug report!
10 |
11 | :warning: Please consider contacting [Braze Support](https://www.braze.com/docs/support_contact) for in-depth troubleshooting and to avoid leaking private information to our public Github issues.
12 | - type: input
13 | id: sdk_version
14 | attributes:
15 | label: Braze Web SDK Version
16 | placeholder: ex. 3.5.0
17 | validations:
18 | required: true
19 | - type: dropdown
20 | id: integration_method
21 | attributes:
22 | label: Integration Method
23 | multiple: false
24 | options:
25 | - CDN
26 | - NPM
27 | - Google Tag Manager
28 | - Segment
29 | - mParticle
30 | - Tealium
31 | - Other (please specify)
32 | validations:
33 | required: true
34 | - type: dropdown
35 | id: browser
36 | attributes:
37 | label: Browser
38 | description: Which browsers can you reproduce this on?
39 | multiple: true
40 | options:
41 | - Chrome
42 | - Firefox
43 | - Safari
44 | - Edge
45 | - Other
46 | validations:
47 | required: true
48 | - type: textarea
49 | id: repro_steps
50 | attributes:
51 | label: Steps To Reproduce
52 | description: Please provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)
53 | placeholder: |
54 | Example:
55 | ```
56 | import braze from "@braze/web-sdk"
57 | braze.subscribeToInAppMessage(function(inAppMessage) {
58 | braze.showInAppMessage(inAppMessage);
59 | });
60 | ```
61 | validations:
62 | required: true
63 | - type: textarea
64 | id: expected_behavior
65 | attributes:
66 | label: Expected Behavior
67 | description: What did you expect to happen?
68 | validations:
69 | required: true
70 | - type: textarea
71 | id: actual_behavior
72 | attributes:
73 | label: Actual Incorrect Behavior
74 | description: What incorrect behavior happened instead?
75 | validations:
76 | required: true
77 | - type: textarea
78 | id: verbose_logs
79 | attributes:
80 | label: Verbose Logs
81 | description: Please set "enableLogging" to true in initialization option and paste verbose log output. This will be automatically formatted into code, so no need for backticks.
82 | render: shell
83 | - type: textarea
84 | id: other_info
85 | attributes:
86 | label: Additional Information
87 | description: Anything else you'd like to share?
88 |
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 |
8 |
9 | * [ ] I have checked [Braze's documentation](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/initial_sdk_setup/) and am still experiencing the issue.
10 |
11 | # Report
12 |
13 | ## Describe your environment.
14 |
15 |
16 | Info | Value |
17 | ----------------------------|-------------------------------------|
18 | SDK Version | e.g. 3.2.0
19 | Browser Affected | e.g. Chrome / Safari / Firefox / all
20 | Affected Browser Version | e.g. 87 / 14.2 / 89 / any
21 | Operating System Affected | e.g. Windows / Mac / iOS / Android / any
22 | Integration Method | e.g. npm / CDN / Google Tag Manager
23 | Repro rate | e.g. All the time (100%) / Sometimes x% / Only once
24 |
25 |
26 | ## What did you do?
27 |
28 |
32 |
33 | ## What did you expect to happen?
34 |
35 |
39 |
40 | ## What happened instead?
41 |
42 |
46 |
47 | ## Steps to reproduce
48 |
49 |
56 |
57 | ## Code Snippet
58 |
59 |
62 |
63 | ## Are you doing any feature customizations that may relate to the issue? Can you share the code snippet?
64 |
65 |
68 |
69 | ## Project that demonstrates the issue
70 |
71 |
74 |
75 |
78 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | # Braze Web SDK [](https://github.com/braze-inc/braze-web-sdk/releases) [](https://js.appboycdn.com/web-sdk/6.4/doc/modules/braze.html) 
8 |
9 | - [Braze User Guide](https://www.braze.com/docs/user_guide/introduction/ "Braze User Guide")
10 | - [Braze Developer Guide](https://www.braze.com/docs/developer_guide/sdk_integration/?sdktab=web "Braze Developer Guide")
11 |
12 | ## Quickstart
13 |
14 | ``` shell
15 | npm install --save @braze/web-sdk
16 | # or, using yarn:
17 | # yarn add @braze/web-sdk
18 | ```
19 |
20 | ``` typescript
21 | import * as braze from "@braze/web-sdk";
22 |
23 | // initialize the SDK
24 | braze.initialize('YOUR-API-KEY-HERE', {
25 | baseUrl: "YOUR-SDK-ENDPOINT-HERE",
26 | });
27 |
28 | braze.changeUser('Jane Doe');
29 | ```
30 |
31 | ## Libraries
32 |
33 | | Name | Description | npm | CDN URL
34 | | ---- | ----------- | --- | -------
35 | | Full | Full SDK with UI. When using the npm version, Javascript bundlers will remove any unused code including the UI. | `@braze/web-sdk` | https://js.appboycdn.com/web-sdk/6.4/braze.min.js
36 | | Core | Contains the SDK without UI. You will need to implement your own UI for In-App Messaging and Content Cards when using this version of the SDK. Our UI elements are fully customizable via css, so we generally recommend integration of the full library instead. | N/A | https://js.appboycdn.com/web-sdk/6.4/braze.core.min.js
37 | | No-AMD | Contains the full SDK without AMD support. This is useful if your site uses RequireJS or another AMD module-loader, but you prefer to load the SDK through the CDN. | N/A | https://js.appboycdn.com/web-sdk/6.4/braze.no-amd.min.js
38 |
39 | ## Supported Browsers
40 |
41 | ### CDN Version
42 |
43 | - Modern Chromium based browsers (Chrome, Edge, Opera)
44 | - Firefox
45 | - Safari
46 |
47 | ### NPM Version
48 |
49 | - Modern Chromium based browsers (Chrome, Edge, Opera)
50 | - Firefox
51 | - Safari
52 |
53 | # Debugging / Troubleshooting
54 |
55 | Pass the option `enableLogging: true` to the initialize function (`braze.initialize('YOUR-API-KEY-HERE', { baseUrl: 'YOUR-SDK-ENDPOINT', enableLogging: true });`) to cause Braze to log to the javascript console. This is valuable for development but is visible to all users,
56 | so remove this option or [provide an alternate logger](https://js.appboycdn.com/web-sdk/6.4/doc/modules/braze.html#setlogger) before you release your page to production.
57 |
58 | ## Font Awesome
59 |
60 | Braze uses [Font Awesome](http://fortawesome.github.io/Font-Awesome/) 4.7.0 for in-app message icons. To disable loading Font Awesome, use the `doNotLoadFontAwesome` initialization option. Check out the [cheat sheet](http://fortawesome.github.io/Font-Awesome/cheatsheet/) to browse available icons.
61 |
62 | ## Contact
63 |
64 | If you have questions, please contact [support@braze.com](mailto:support@braze.com).
--------------------------------------------------------------------------------
/sample-builds/google-tag-manager/src/App.tsx:
--------------------------------------------------------------------------------
1 | function App() {
2 | const changeUser = () => {
3 | window.dataLayer.push({
4 | event: "identify",
5 | userId: "abc"
6 | });
7 | };
8 |
9 | const logCustomEvent = () => {
10 | window.dataLayer.push({
11 | event: "add to cart"
12 | });
13 | };
14 |
15 | const logPurchase = () => {
16 | window.dataLayer.push({
17 | event: "purchase",
18 | productId: "abc",
19 | price: 100,
20 | currency: "usd",
21 | quantity: 1
22 | });
23 | };
24 |
25 | const disable = () => {
26 | window.dataLayer.push({
27 | event: "disable"
28 | });
29 | };
30 | const enable = () => {
31 | window.dataLayer.push({
32 | event: "enable"
33 | });
34 | };
35 |
36 | const logEcommerceEvent = () => {
37 | window.dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.
38 | window.dataLayer.push({
39 | event: "ecommerce",
40 | ecommerce: {
41 | transaction_id: "T_12345",
42 | affiliation: "Google Merchandise Store",
43 | value: 25.42,
44 | tax: 4.9,
45 | shipping: 5.99,
46 | currency: "USD",
47 | coupon: "SUMMER_SALE",
48 | items: [
49 | {
50 | item_id: "SKU_12345",
51 | item_name: "Stan and Friends Tee",
52 | affiliation: "Google Merchandise Store",
53 | coupon: "SUMMER_FUN",
54 | currency: "USD",
55 | discount: 2.22,
56 | index: 0,
57 | item_brand: "Google",
58 | item_category: "Apparel",
59 | item_category2: "Adult",
60 | item_category3: "Shirts",
61 | item_category4: "Crew",
62 | item_category5: "Short sleeve",
63 | item_list_id: "related_products",
64 | item_list_name: "Related Products",
65 | item_variant: "green",
66 | location_id: "L_12345",
67 | price: 9.99,
68 | quantity: 1
69 | },
70 | {
71 | item_id: "SKU_12346",
72 | item_name: "Google Grey Women's Tee",
73 | affiliation: "Google Merchandise Store",
74 | coupon: "SUMMER_FUN",
75 | currency: "USD",
76 | discount: 3.33,
77 | index: 1,
78 | item_brand: "Google",
79 | item_category: "Apparel",
80 | item_category2: "Adult",
81 | item_category3: "Shirts",
82 | item_category4: "Crew",
83 | item_category5: "Short sleeve",
84 | item_list_id: "related_products",
85 | item_list_name: "Related Products",
86 | item_variant: "gray",
87 | location_id: "L_12345",
88 | price: 20.99,
89 | promotion_id: "P_12345",
90 | promotion_name: "Summer Sale",
91 | quantity: 1
92 | }
93 | ]
94 | }
95 | });
96 | };
97 |
98 | return (
99 |
100 |
101 |
102 | This is a sample app demonstrating the Google Tag Manager integration
103 | with Braze.
104 |
123 | );
124 | }
125 |
126 | export default App;
127 |
--------------------------------------------------------------------------------
/snippets/loading-snippet.js:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/sample-builds/cdn/index.html:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 | Braze Web SDK Sample Integration
8 |
28 |
29 |
30 | This is a sample integration of the Braze Web SDK, with web push integrated.
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/UPGRADE_GUIDE.md:
--------------------------------------------------------------------------------
1 | # Upgrade Guide
2 |
3 | ## V5 to V6
4 |
5 | Version 6 of the Braze Web SDK (`@braze/web-sdk`) removes the legacy News Feed feature and deprecated banner APIs, introduces stricter typings, and makes small rendering changes for improved accessibility.
6 |
7 | ### V6 Breaking Changes
8 |
9 | #### Behavioral Changes
10 |
11 | - The [`insertBanner()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#insertbanner) method now automatically tracks impressions and clicks. The separate `Banner.html`, `logBannerClick()`, and `logBannerImpressions()` APIs have been removed.
12 | - The images in In-App Messages with `cropType: CENTER_CROP` (e.g. `FullScreenMessage`) are now rendered using an `` tag instead of a ``. This improves accessibility but may require updating CSS customizations that target `.ab-center-cropped-img`.
13 | - TypeScript typings now reflect that some methods return `undefined` when the SDK has not been initialized. This can surface new TypeScript compile-time errors if your code assumed a value. Add guards/optional chaining, or refine types where needed.
14 |
15 | #### Removed APIs
16 |
17 | The following methods and properties have been removed:
18 |
19 | | API | Details |
20 | | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21 | | `braze.Banner.html` / `braze.logBannerClick()` / `braze.logBannerImpressions()` | Replaced by [`insertBanner()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#insertbanner), which handles rendering, impressions, and clicks. |
22 | | Legacy News Feed (`braze.Feed class`) | Fully removed, along with: `destroyFeed()`, `getCachedFeed()`, `logFeedDisplayed()`, `requestFeedRefresh()`, `showFeed()`, `subscribeToFeedUpdates()`, `toggleFeed`(). |
23 | | `logCardClick()` / `logCardImpressions()` | Use [`logContentCardClick()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardclick) and [`logContentCardImpressions()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardimpressions) instead. |
24 | | `Card.created` and `Card.categories` | Fields used by legacy News Feed and removed from `Card` subclasses.
25 | | `ImageOnly.linkText` (and constructor param) | Unused and removed.
26 |
27 | ---
28 |
29 | ## V4 to V5
30 |
31 | Version 5 of the Braze Web SDK (`@braze/web-sdk`) includes a few functional improvements and removal of previously deprecated APIs, thus improving the bundle size.
32 |
33 | ### V5 Breaking Changes
34 |
35 | #### Behavioral Changes
36 |
37 | - The [`subscribeToFeatureFlagsUpdates()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#subscribetofeatureflagsupdates) callback will now always be called, regardless of refresh success/failure. If there is a failure in receiving updates, the callback will be called with currently cached feature flags.
38 | - The [`getFeatureFlag()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#getfeatureflag) method now returns `null` if the feature flag does not exist.
39 | - The SDK no longer throws runtime errors anywhere. If Braze methods are called prior to initialization, a warning will be logged to the console instead.
40 | - The SDK no longer adds default Braze in-app message styles to custom HTML in-app messages. These styles were previously used by legacy in-app message types.
41 |
42 | #### Removed APIs
43 |
44 | The following methods and properties have been removed:
45 |
46 | | API | Details |
47 | | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
48 | | `braze.logContentCardsDisplayed()` | Obsolete, no-op method that has been deprecated since 4.0.4. |
49 | | `enableHtmlInAppMessages` initialization option | Deprecated since 3.3.0 in favor of [`allowUserSuppliedJavascript`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) option which has the same functionality |
50 | | `braze.Banner` class | Deprecated since 4.9.0 in favor of [`braze.ImageOnly`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.imageonly.html) with the same functionality |
51 | | `ab-banner` CSS classname | This is part of `braze.Banner` class removal. CSS customizations should instead target `ab-image-only` CSS class. |
52 |
53 | ---
54 |
55 | ## V3 to V4
56 |
57 | - [Tree-Shaking Benefits](#tree-shaking)
58 | - [Breaking Changes](#v4-breaking-changes)
59 |
60 | Version 4 of the Braze Web SDK (`@braze/web-sdk` package) now supports tree-shaking 🎉 and has been rewritten as native, side-effect free ES Modules.
61 |
62 | You can now `import` individual methods and classes, or use wildcard syntax to import the entire SDK. In both approaches, your javascript module bundlers can remove any unused code resulting in faster website performance.
63 |
64 | ```typescript
65 | import * as braze from "@braze/web-sdk";
66 |
67 | // or, if you prefer to import individual modules:
68 | // import { initialize } from "@braze/web-sdk";
69 |
70 | braze.initialize("YOUR-API-KEY", { baseUrl: "YOUR-SDK-ENDPOINT" });
71 | braze.automaticallyShowInAppMessages();
72 | braze.subscribeToContentCardsUpdates(function(contentCards) {
73 | console.log(contentCards);
74 | });
75 | braze.openSession();
76 | ```
77 |
78 | ### Tree-Shaking
79 |
80 | Version 4 has been rewritten as individually exported ES Modules. If you use a modern javascript bundler (like [Webpack](https://webpack.js.org/) or [Rollup](https://rollupjs.org/)) you can benefit from "tree-shaking", which automatically removes unused SDK code to make your website more performant.
81 |
82 | The table below shows how many kilobytes you may save as a result of upgrading to v4. Note that these are estimates, and your bundle sizes may vary based on your webpage structure and the individual methods you actually use.
83 |
84 | For context, version `@braze/web-sdk@3.5` and `@braze/web-sdk-core@3.5` weigh in at `51.9kB` and `37.3kB` respectively, whereas v4 starts at `25.5kB` and builds based on features you use. The "Estimated Savings" column compares `@braze/web-sdk@3.5` to importing only the given feature.
85 |
86 | | Module or Feature | Estimated Size (gzipped) | Estimated Savings |
87 | | --------------------- | ------------------------ | ---------------------------------- |
88 | | Analytics | `0.9kB` | ~ 49.1% reduction (`26.4kB` total) |
89 | | Push | `2.4kB` | ~ 46.2% reduction (`27.9kB` total) |
90 | | Content Cards (no UI) | `4.5kB` | ~ 44.1% reduction (`29.0kB` total) |
91 | | Content Cards UI | `12.0kB` | ~ 27.7% reduction (`37.5kB` total) |
92 | | In-App Messages UI | `12.7kB` | ~ 26.4% reduction (`38.2kB` total) |
93 |
94 | **Notes**:
95 |
96 | - "Analytics" was measured by including `logCustomEvent`, `setCustomUserAttribute`, and `changeUser` methods.
97 | - "In-App Messages UI" was measured by including `automaticallyShowInAppMessages` or `showInAppMessage`
98 | - "Content Cards UI" was measured by including `showContentCards`, `hideContentCards` or `toggleContentCards`
99 | - "Push" was measured by including `requestPushPermission`
100 |
101 | ### V4 Breaking Changes
102 |
103 | #### Behavioral Changes
104 |
105 | - The `automaticallyShowInAppMessages()` or `subscribeToInAppMessage()` methods must be called prior to `openSession()` to ensure session-start triggered messages are processed.
106 | - Content Cards will now only refresh on session start if `subscribeToContentCardsUpdates()` is called prior to `openSession`. You can manually refresh Content Cards using `requestContentCardsRefresh()`.
107 |
108 | #### Renamed APIs
109 |
110 | The following methods have been renamed:
111 |
112 | | Old (v3.x) | New (v4.0) |
113 | | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
114 | | `appboy.registerAppboyPushMessages()` | [`requestPushPermission()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#requestpushpermission) |
115 | | `appboy.unregisterAppboyPushMessages()` | [`unregisterPush()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#unregisterpush) |
116 | | `appboy.automaticallyShowNewInAppMessages()` | [`automaticallyShowInAppMessages()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#automaticallyshowinappmessages) |
117 | | `appboy.toggleAppboyLogging()` | [`toggleLogging()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#togglelogging) |
118 | | `appboy.display.*` | The `appboy.display` namespace has been removed. To upgrade, find and replace all references to `appboy.display.` with `braze.` |
119 |
120 | #### Removed APIs
121 |
122 | The following methods and properties have been removed:
123 |
124 | | API | Details |
125 | | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
126 | | `appboy.isPushGranted()` | Deprecated since 1.6.2 in favor of [`isPushPermissionGranted()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#ispushpermissiongranted) |
127 | | `appboy.subscribeToNewInAppMessages()` | Deprecated since 2.4.0 in favor of [`subscribeToInAppMessage()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#subscribetoinappmessage) |
128 | | `appboy.trackLocation()` | Deprecated since 3.3.0 in favor of using the native Geolocation API and passing the location data to [`User.setLastKnownLocation()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.user.html#setlastknownlocation). The corresponding `appboyBridge.trackLocation()` method has also been removed. |
129 | | `appboy.stopWebTracking()` | Deprecated since 3.5.0 in favor of using [`disableSDK()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#disablesdk) |
130 | | `appboy.resumeWebTracking()` | Deprecated since 3.5.0 in favor of using [`enableSDK()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#enablesdk) |
131 | | `safariWebsitePushId` parameter from the `appboy.registerAppboyPushMessages()` method | Deprecated & undocumented since 1.6.1 in favor of the [`initialization option`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) with the same name |
132 | | `devicePropertyWhitelist` initialization option | Deprecated since 3.1.0 in favor of [`devicePropertyAllowlist`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) which has the same functionality |
133 | | `language` initialization option | Use the [`localization`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) option which has the same functionality |
134 | | `cardId` and `campaignId` properties of In-App Messages | If you are manually constructing instances of `InAppMessage` subclasses, you will need to update the constructors ([docs](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.inappmessage.html)) |
135 | | `User.setAvatarImageUrl()` | Method no longer used |
136 |
137 | ---
138 |
139 | ## V2 to V3
140 |
141 | - [Breaking Changes](#v3-breaking-changes)
142 |
143 | Version 3 of the Braze Web SDK (`@braze/web-sdk`) now comes bundled with TypeScript definitions!
144 |
145 | The TypeScript defintions include documentation and autocomplete in IDEs that support it, even if your project does not use TypeScript.
146 |
147 | **Note**: The SDK loading snippet has been updated. If you integrate the Braze Web SDK using the CDN, you must [update the loading snippet](https://github.com/braze-inc/braze-web-sdk/tree/1feef199dd5eae15479db80524bb934c3b40f548#alternative-cdn-installation) when upgrading to 3.0.
148 |
149 | ### V3 Breaking Changes
150 |
151 | The following breaking changes have been made to allow for a better TypeScript experience:
152 |
153 | | API | details |
154 | | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
155 | | `appboy.ab` | The `ab` namespace has been removed. To upgrade, find and replace all references to `appboy.ab` with `appboy` |
156 | | `InAppMessage.Button` | Renamed to `InAppMessageButton`. To upgrade, find and replace all references to `InAppMessage.Button` with `InAppMessageButton` |
157 | | `openSession(callback)` | The `callback` parameter has been removed since v2.3.1. |
158 | | `changeUser(callback)` | The `callback` parameter has been removed since v2.3.1. |
159 | | `baseUrl` initialization option | Now **required** to initialize the SDK. If your integration did not already provide the `baseUrl` option, it should now be set to the previous default value of `sdk.iad-01.braze.com` (e.g, `appboy.initialize('YOUR-API-KEY', { baseUrl: 'sdk.iad-01.braze.com' });`) |
160 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 6.4.0
2 |
3 | ##### Added
4 | - Added methods [`braze.logBannerImpressions()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logbannerimpressions) and [`braze.logBannerClick()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logbannerclick) to allow integrators to manually log both the banner impression and click events. These methods should only be called if you're bypassing [`insertBanner`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#insertbanner) and building custom UI for banners similar to other channels.
5 |
6 | ##### Fixed
7 | - Fixed an issue where In-App Messages for the previous user were still displayed after changing users.
8 |
9 | ## 6.3.1
10 |
11 | ##### Fixed
12 | - Fixed an issue where banner impressions were not cleared from local storage when a new session was opened.
13 |
14 | ## 6.3.0
15 |
16 | ##### Added
17 | - Exposed `NotificationSubscriptionTypes` in `brazeBridge`.
18 | - Added support for detection of ChatGPT Atlas browser.
19 | - Improved crawler bot detection.
20 |
21 | ## 6.2.0
22 |
23 | ##### Added
24 | - Updated platform detection for the `Coolita` and `WhaleTV` Smart TV platforms, which are now classified as `Other Smart TV`.
25 |
26 | ## 6.1.0
27 |
28 | ##### Added
29 | - Added support for [`Banner`](https://js.appboycdn.com/web-sdk-develop/latest/doc/classes/braze.banner.html) properties.
30 |
31 | ##### Changed
32 | - The default client-side rate limiting value for Banners refresh has been increased. For more information on SDK rate limiting, please refer to the [Braze Developer Guide](https://www.braze.com/docs/developer_guide/sdk_integration/rate_limits#braze-sdk-rate-limits)
33 |
34 | ##### Fixed
35 | - Fixed an issue where Banner serialization keys were inconsistent between SDK versions, which could cause Banners to display incorrectly until the first Banners refresh after a version upgrade.
36 | - Fixed an issue where PetalBot and Meta web crawlers were not properly detected.
37 |
38 | ## 6.0.0
39 |
40 | ##### ⚠️ Breaking
41 | - Removed the `Banner.html` property, `logBannerClick`, and `logBannerImpressions` methods. Instead, use [`insertBanner`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#insertbanner) which automatically handles impression and click tracking.
42 | - Removed support for the legacy News Feed feature.
43 | This includes removal of the `Feed` class, and the following associated methods:
44 | - `destroyFeed()`
45 | - `getCachedFeed()`
46 | - `logFeedDisplayed()`
47 | - `requestFeedRefresh()`
48 | - `showFeed()`
49 | - `subscribeToFeedUpdates()`
50 | - `toggleFeed()`
51 | - `logCardClick()` (replaced by [`logContentCardClick()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardclick))
52 | - `logCardImpressions()` (replaced by [`logContentCardImpressions()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardimpressions))
53 | - The `created` and `categories` fields that were used by legacy News Feed cards have been removed from [`Card`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.card.html) subclasses.
54 | - The `linkText` field was also removed from the [`ImageOnly`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.imageonly.html) Card subclass and its constructor.
55 | - Clarified definitions and updated types to note that certain SDK methods explicitly return `undefined` when the SDK is not initialized, aligning the typings with actual runtime behavior. This could introduce new TypeScript errors in projects that relied on the previous (incomplete) typings.
56 | - The images of In-App Messages with `cropType` of `CENTER_CROP` (e.g. `FullScreenMessage` by default) are now rendered via an `` tag instead of `` for improved accessibility. This may break existing CSS customizations for the `.ab-center-cropped-img` class or its children.
57 |
58 | ##### Added
59 | - Added `imageAltText` and `language` fields to the following classes:
60 | - Cards: [`CaptionedImage`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.captionedimage.html), [`ImageOnly`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.imageonly.html), and [`ClassicCard`]
61 | - In-App Messages: [`ModalMessage`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.modalmessage.html), [`FullScreenMessage`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.fullscreenmessage.html), and [`SlideUpMessage`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.slideupmessage.html)
62 | - When available, the default UI will use these fields to set the alternate text of images and the `lang` attribute, respectively, of In-App Messages and Cards.
63 | - Improved the accessibility of In-App Messages and Content Cards when displayed by the default UI.
64 |
65 | ##### Changed
66 | - Any new session subscriptions now immediately invoke the callback if a new session has already started.
67 |
68 | ##### Fixed
69 | - Subscription methods now correctly trigger refreshes when `openSession()` is called, even if `changeUser()` was called first.
70 | - Fixed an issue where Banners could display with a small amount of whitespace at the bottom.
71 | - Fixed an issue where the `messageExtras` field was missing from the type definitions of InAppMessage classes.
72 |
73 | ## 5.9.1
74 |
75 | ##### Fixed
76 | - Fixed an issue where rate limit state persisted across users and sessions causing requests to be incorrectly rate limited at session start.
77 |
78 | ## 5.9.0
79 |
80 | ##### Added
81 | - Added `brazeBridge.setBannerHeight()` to allow Banners to resize dynamically.
82 |
83 | ##### Fixed
84 | - Fixed an edge case with retry logic for Feature Flags, Content Cards and Banners network requests.
85 |
86 | ## 5.8.1
87 |
88 | ##### Fixed
89 | - Fixed an issue with the npm version of the Web SDK that prevented Banner clicks from being logged.
90 |
91 | ## 5.8.0
92 |
93 | ##### Changed
94 | - The [`insertBanner`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#insertbanner) method now accepts a `null` or `undefined` banner argument.
95 | - [`requestBannersRefresh`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#requestbannersrefresh) now waits for the initial response from the backend and tries again if Banners are enabled.
96 |
97 | ##### Fixed
98 | - Fixed a race condition causing "not enabled" messages to be logged for Banners and Feature Flags methods on the user's first session.
99 |
100 | ## 5.7.0
101 |
102 | ##### Added
103 | - Added a method [`User.setLineId`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.user.html#setlineid) used to set the user's [LINE](https://www.braze.com/docs/user_guide/message_building_by_channel/line) User ID.
104 |
105 | ##### Fixed
106 | - Fixed an issue where the chevron icon pointed in the wrong direction on SlideUp in-app messages when using RTL languages.
107 |
108 | ##### Changed
109 | - The SDK now respects the `retry-after` header returned by the Braze platform when determining how long to wait before retrying a request.
110 |
111 | ## 5.6.1
112 |
113 | ##### Fixed
114 | - Fixed an issue where the Tizen operating system was not accurately reported in device properties.
115 |
116 | ## 5.6.0
117 |
118 | ##### Added
119 | - Added support for the Banners campaign type.
120 |
121 | ##### Fixed
122 | - Fixed an issue where the SDK could erroneously request a triggers refresh even if no session is started.
123 | - Fixed an issue where `ControlMessage` instances would allow multiple impressions.
124 |
125 | ## 5.5.0
126 |
127 | ##### Changed
128 | - The SDK now rate limits Content Cards impressions to correspond to expected human behavior.
129 |
130 | ## 5.4.0
131 |
132 | ##### Added
133 | - Added support for right-to-left languages to the built-in UI for In-App Messages and Content Cards.
134 | - Introduced a new initialization option [`serviceWorkerScope`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) that can be used to override the default scope of the service worker.
135 | - Added a method [`braze.isInitialized()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#isinitialized) that returns whether the SDK has been initialized.
136 | - Added a new custom event named `braze.initialized` that is dispatched on the `window` object when the Braze initialization completes.
137 |
138 | ## 5.3.2
139 |
140 | ##### Fixed
141 | - Fixed a regression introduced in 5.2.0 that could cause HTML In-App Messages to render incorrectly when an external script is loaded synchronously.
142 |
143 | ## 5.3.1
144 |
145 | ##### Fixed
146 | - Fixed an issue where a custom `serviceWorkerLocation` was not used when calling `unregisterPush`.
147 |
148 | ## 5.3.0
149 |
150 | ##### Added
151 | - Added the following methods to the `FeatureFlag` class to support the upcoming expansion of feature flag property types:
152 | - [`getJsonProperty()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.featureflag.html#getjsonproperty)
153 | - [`getImageProperty()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.featureflag.html#getimageproperty)
154 | - [`getTimestampProperty()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.featureflag.html#gettimestampproperty)
155 |
156 | ##### Fixed
157 | - Fixed an issue where `e.preventDefault()` could be called on events that were not cancelable.
158 |
159 | ## 5.2.0
160 |
161 | ##### Added
162 | - Added a [`deviceId`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) initialization option. This can be used to set device ID of the user that would be used after initialization.
163 | - Added support for the `message_extras` liquid tag for in-app messages.
164 |
165 | ##### Changed
166 | - The SDK will now persist and send the user's alias in all backend requests if it has been set, until the user is identified via an external ID. This alias will no longer be sent in requests once the user is identified and is not compatible with SDK authentication.
167 | - The SDK will now check for existing permissions before requesting push permissions.
168 |
169 | ##### Fixed
170 | - Fixed an issue where `unregisterPush()` failed to invoke the `successCallback()` function in some cases where the user has already unsubscribed to push.
171 | - Fixed an issue where characters `|` and `:` were not supported in the `userId`.
172 | - Fixed an issue where HTML In-App Messages that used module script tags were not supported.
173 |
174 | ## 5.1.1
175 |
176 | ##### Fixed
177 | - Fixed an issue where content cards sync request count persisted across users causing requests to be incorrectly rate limited.
178 |
179 | ## 5.1.0
180 |
181 | ##### Changed
182 | - The [`subscribeToFeatureFlagsUpdates()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#subscribetofeatureflagsupdates) callback will be triggered first with cached feature flags only if this cache is from the current session.
183 |
184 | ##### Fixed
185 | - Fixed an issue where in-app messages failed to render a transparent background when using color-scheme.
186 | - Fixed an issue where impressions for a given feature flag ID were limited to once-per-user instead of once-per-session.
187 |
188 | ## 5.0.1
189 |
190 | ##### Fixed
191 | - Fixed a bug where toggling `noCookies` initialization option from true to false did not create all the necessary cookies.
192 | - Fixed an issue where user attributes could not be nulled out by setting a specific null value.
193 |
194 | ## 5.0.0
195 |
196 | ##### ⚠️ Breaking
197 | - The [`subscribeToFeatureFlagsUpdates()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#subscribetofeatureflagsupdates) callback will now always be called, regardless of refresh success/failure. If there is a failure in receiving updates, the callback will be called with currently cached feature flags.
198 | - The [`getFeatureFlag()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#getfeatureflag) method now returns a null if the feature flag does not exist, or if feature flags are disabled.
199 | - Removed `logContentCardsDisplayed()` method that was previously deprecated in 4.0.4.
200 | - Removed the deprecated initialization option `enableHtmlInAppMessages`. This should be replaced with the `allowUserSuppliedJavascript` option instead.
201 | - Removed `Banner` class that was previously deprecated in 4.9.0 in favor of [`ImageOnly`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.imageonly.html).
202 | - Removed `ab-banner` CSS classname as part of `Banner` class removal. CSS customizations should instead target the `ab-image-only` class.
203 | - The SDK no longer throws runtime errors anywhere. If Braze methods are called prior to initialization, a warning will be logged to the console instead.
204 | - The SDK no longer adds default Braze in-app message styles to custom HTML in-app messages. These styles were previously used by legacy in-app message types.
205 |
206 | ## 4.10.2
207 |
208 | ##### Fixed
209 | - Fixed a CSS templating issue in the npm version of the SDK introduced in 4.10.1 that caused in-app messages to display without the expected styles when using Braze built-in UI.
210 |
211 | ## 4.10.1
212 |
213 | ##### Fixed
214 | - Fixed an issue where user attributes could not be nulled out by setting a specific null value.
215 |
216 | ## 4.10.0
217 |
218 | ##### Added
219 | - Added a new [`appVersionNumber`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) initialization option for [targeting via numerical comparison](https://www.braze.com/docs/user_guide/engagement_tools/campaigns/ideas_and_strategies/new_features/).
220 |
221 | ##### Changed
222 | - The SDK now ensures that cached messages for user (content cards, deferred in-app message, and feature flags) are cleared upon `changeUser()`.
223 | - [`getDeviceId`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#getdeviceid) and [`getUserId`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.user.html#getuserid) now return results directly. Their callback parameters are deprecated and will be removed in a future major version.
224 |
225 | ## 4.9.0
226 |
227 | ##### Added
228 | - Introduced a new [`ImageOnly`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.imageonly.html) Card subclass, which has the same functionality as the [`Banner`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.banner.html) class.
229 | - Added a new `ab-image-only` CSS class to `Banner` and `ImageOnly` cards when displayed through the built-in UI. New CSS customizations should target this class. The `ab-banner` classname will remain on both card types until the `Banner` class is removed in a future release.
230 | - Introduced two new methods [`deferInAppMessage()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#deferinappmessage) and [`getDeferredInAppMessage()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#getdeferredinappmessage) that can be used together to delay the display of an in-app message for a future pageload.
231 | - [`deferInAppMessage()`] method defers the given in-app message.
232 | - The deferred in-app message can be retrieved by calling the [`getDeferredInAppMessage`] method.
233 |
234 | ##### Changed
235 | - Deprecated the [`Banner`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.banner.html) class.
236 |
237 | ##### Fixed
238 | - Fixed an issue where in-app messages with images would fail to display when a parent node is supplied to `showInAppMessage()` and the parent node has not been attached to the DOM before the display callback is invoked.
239 | - Fixed an issue where the callbacks passed to `requestContentCardsRefresh()` were sometimes not triggered when this call was queued behind another `requestContentCardsRefresh()` or `subscribeToContentCardsUpdates()` request.
240 | - Fixed an issue where `dismissCard()` did not work as expected on cached content cards.
241 | - Fixed an issue where calling `destroy()` soonafter `wipeData()` incorrectly created a device ID cookie.
242 |
243 | ## 4.8.3
244 |
245 | ##### Fixed
246 | - Fixed an issue where `manageServiceWorkerExternally` initialization option failed to register service-worker when trying to register from a path higher than the service-worker location.
247 |
248 | ## 4.8.2
249 |
250 | ##### Fixed
251 | - Fixed an issue where slow / failed image loading prevents subsequent in-app messages from displaying.
252 | - Fixed a regression introduced in 4.8.0 where push notifications failed to display in Safari versions <= 15.
253 |
254 | ## 4.8.1
255 |
256 | ##### Fixed
257 | - Fixed an issue where content cards were sometimes not marked as read upon card impression.
258 | - Improved the typings for the `isControl` field on In-App Message and Card classes.
259 |
260 | ## 4.8.0
261 |
262 | ##### Changed
263 | - The [`subscribeToFeatureFlagsUpdates`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#subscribetofeatureflagsupdates) callback will now always be called first with the currently cached feature flags, and when feature flag updates are available.
264 |
265 | ##### Fixed
266 | - Fixed the return type for [`subscribeToContentCardsUpdates()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#subscribetocontentcardsupdates).
267 | - Fixed the return type for [`subscribeToFeatureFlagsUpdates()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#subscribetofeatureflagsupdates).
268 | - Improved type definitions in Card, InAppMessage and InAppMessageButton classes:
269 | - Fixed return types for [`Card.subscribeToClickedEvent()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.card.html#subscribetoclickedevent) and [`Card.subscribeToDismissedEvent()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.card.html#subscribetodismissedevent).
270 | - Fixed return types for [`InAppMessage.subscribeToClickedEvent()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.inappmessage.html#subscribetoclickedevent) and [`InAppMessage.subscribeToDismissedEvent()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.inappmessage.html#subscribetodismissedevent).
271 | - Fixed return type for [`InAppMessageButton.subscribeToClickedEvent()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.inappmessagebutton.html#subscribetoclickedevent).
272 | - Fixed type definition of [`InAppMessage.extras`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.inappmessage.html#extras).
273 |
274 | ## 4.7.2
275 |
276 | ##### Fixed
277 | - Fixed a regression with the noCookies option which caused some localStorage keys to be persisted in cookie storage.
278 |
279 | ## 4.7.1
280 |
281 | ##### Fixed
282 | - Improved the type definition of [`Card.extras`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.card.html).
283 | - Fixed a regression introduced in 4.0.0 where the `manageServiceWorkerExternally` and `disablePushTokenMaintenance` initialization options could not work as expected.
284 |
285 | ## 4.7.0
286 |
287 | ##### Added
288 | - [`User.setCustomUserAttribute`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.user.html#setcustomuserattribute) now accepts nested custom attributes and arrays of objects.
289 | - Adds a `merge` parameter that specifies whether the value should be merged with the existing value on the backend. If `false` (default), any existing attribute will be overwritten. If `true`, existing objects and arrays of objects will be merged. To update an array of objects, follow the guidelines in our [public docs](https://www.braze.com/docs/user_guide/data_and_analytics/custom_data/custom_attributes/array_of_objects/#usage-examples).
290 |
291 | ##### Fixed
292 | - Fixed an issue where [`requestPushPermission`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#requestpushpermission) did not call the `deniedCallback` if the SDK encountered certain errors when registering push.
293 | - Fixed an issue where `requestPushPermission` did not log a message if push is not supported on the user's browser.
294 | - Fixed an incorrect typing in `subscribeToSdkAuthenticationFailures`.
295 |
296 | ## 4.6.3
297 |
298 | ##### Fixed
299 | - Fixed an issue preventing Feature Flags refreshes when SDK Authentication errors occur.
300 |
301 | ## 4.6.2
302 |
303 | ##### Changed
304 | - Removed legacy email capture CSS. This is not a breaking change, as all existing web email capture campaigns have been migrated to the new universal email capture type on the Braze backend. This change results in ~1KB size reduction for those using the built-in In-App Message UI.
305 |
306 | ## 4.6.1
307 |
308 | ##### Fixed
309 | - Improved the type definition of [`FeatureFlag.properties`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.featureflag.html).
310 |
311 | ## 4.6.0
312 |
313 | ##### Added
314 | - Added a method [`braze.logContentCardClick()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardclick) to log that the user clicked on the given Content Card. This method is equivalent to calling [`braze.logCardClick()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcardclick) with parameter `forContentCards = true`.
315 | - Added support for the upcoming Braze Feature Flags product.
316 |
317 | ##### Changed
318 | - Improved the check for duplicate in-app messages at display time.
319 |
320 | ## 4.5.1
321 |
322 | ##### Fixed
323 | - Fixed an issue where sites with globally-scoped `svg` and `img` CSS caused certain elements of the built-in UI to display incorrectly.
324 |
325 | ## 4.5.0
326 |
327 | ##### Added
328 | - Added `isControl` property to [`ContentCard`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.card.html) base model, to easily determine whether the card is a control card.
329 | - Added `isControl` property to [`InAppMessage`](https://js.appboycdn.com/web-sdk/latest/doc/classes/braze.inappmessage.html) base model, to easily determine whether the message is a control in-app-message.
330 |
331 | ##### Changed
332 | - Improved the reliability of in-app message impression logging in edge cases.
333 |
334 | ## 4.4.0
335 |
336 | ##### Added
337 | - A message is now logged if an IAM is triggered but not displayed because neither `automaticallyShowInAppMessages()` nor `subscribeToInAppMessage()` were called.
338 |
339 | ##### Changed
340 | - IndexedDB connections now close after a transaction has been completed.
341 |
342 | ##### Fixed
343 | - Fixed an issue introduced in 4.0.0 where In-App Message closing animations did not work as expected.
344 |
345 | ## 4.3.0
346 |
347 | ##### Added
348 | - Added [`brazeBridge.changeUser(id: string, sdkAuthSignature?: string)`](https://www.braze.com/docs/user_guide/message_building_by_channel/in-app_messages/customize/html_in-app_messages/#bridge) to HTML In-App Messages.
349 | - Added the ability to include a custom pathname in the `baseUrl` [initialization option](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions).
350 |
351 | ## 4.2.1
352 |
353 | ##### Fixed
354 | - Fixed an issue introduced in 4.0.3, where IAM displays could sometimes fail due to an internal race condition.
355 |
356 | ## 4.2.0
357 |
358 | ##### Added
359 | - Added support for Content Cards to evaluate Retry-After headers.
360 |
361 | ## 4.1.0
362 |
363 | ##### Added
364 | - Added a method [`braze.logContentCardImpressions()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardimpressions) to log that the user saw the given Content Cards. This method is equivalent to calling [`braze.logCardImpressions()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcardimpressions) with parameter `forContentCards = true`.
365 |
366 | ##### Fixed
367 | - Fixed an issue where calling `unregisterPush()` when the user is already unregistered would fail to execute the success callback function.
368 |
369 | ## 4.0.6
370 |
371 | ##### Fixed
372 | - Fixed an issue introduced in 4.0.0 that incorrectly failed to display valid IAMs with an unknown Braze Action type error.
373 |
374 | ## 4.0.5
375 |
376 | ##### Fixed
377 | - Fixed an issue introduced in 4.0.0 that prevented the SDK from running with certain rollup.js configurations.
378 |
379 | ## 4.0.4
380 |
381 | ##### Changed
382 | - Deprecated and changed the obsolete [logContentCardsDisplayed](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcontentcardsdisplayed) method to a no-op. Card impressions should be logged using [logCardImpressions](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#logcardimpressions).
383 |
384 | ##### Fixed
385 | - Fixed an issue introduced in 4.0.0 that prevented control in-app message impressions from being logged.
386 |
387 | ## 4.0.3
388 |
389 | ##### Fixed
390 | - Fixed an issue introduced in 4.0.0 where Safari push did not work unless the full `baseUrl` (e.g. `https://sdk.iad-01.braze.com/api/v3`) was specified in the initialization options.
391 | - The SDK will now ignore In-App Messages containing a push prompt Braze Action for users who have already registered for push or whose browser does not support push.
392 |
393 | ## 4.0.2
394 |
395 | ##### Changed
396 | - Cookies set by the Braze Web SDK now expire after 400 days per the recommendation of the [HTTP Working Group's draft RFC 6265](https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html#section-4.1.2.2)
397 |
398 | ##### Fixed
399 | - Removed usages of the nullish coalescing operator for better compatibility with various webpack configurations.
400 |
401 | ## 4.0.1
402 |
403 | ##### Fixed
404 | - The `created` field is now set for `Card` objects when using Content Cards.
405 | - Added `"type": "module"` to the package.json so frameworks like Next.js recognize the SDK as an ES Module.
406 |
407 | ## 4.0.0
408 |
409 | ##### ⚠️ Breaking
410 | - See our [upgrade guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) for more information on how to migrate from v3.
411 | - The `appboy-web-sdk`, `@braze/web-sdk-core`, and `@braze/web-sdk-no-amd` npm packages are deprecated in favor of the `@braze/web-sdk` package and will no longer receive updates.
412 | - The SDK's exported object has been renamed from `appboy` to `braze`. CDN users must update their loading snippet when upgrading to 4.0.
413 | - The file name for the bundled version of the SDK has changed to `braze.min.js`. CDN users must ensure that the URL points to this new file name when upgrading to 4.0.
414 | - The Braze Web SDK now supports importing individual features and methods as native ES Modules that can be tree-shaken. For example, if you only use In-App Messages with a custom UI, you can now import our `InAppMessage` classes and `subscribeToInAppMesssage()` and Javascript module bundlers such as webpack will remove any unused code. If you prefer to continue using a compiled version of the SDK, it can be found through our CDN.
415 | - The prefix for SDK logs has changed from `Appboy` to `Braze`. If you use the `Appboy` prefix as a filter in your logging tools, you should update it to include `Braze`.
416 | - As a result of the above changes, many of our method signatures have changed. See our [upgrade guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) for more information on how to migrate.
417 | - Dropped support for Internet Explorer.
418 |
419 | ##### Changed
420 | - Updated default z-index of `InAppMessage` to 9001. This can be still be overwritten using the [inAppMessageZIndex](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#initializationoptions) initialization option.
421 |
422 | ##### Added
423 | - Introduced support for the new Braze Actions feature. When displaying In-App Messages and Content Cards through our built-in UI, this feature requires no additional code.
424 | - Added [`braze.handleBrazeAction()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/braze.html#handlebrazeaction) to handle Braze Action URLs when using a custom UI.
425 |
426 | ## 3.5.1
427 |
428 | ##### Changed
429 | - Added Shopify to [`BrazeSdkMetadata`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.brazesdkmetadata.html)
430 |
431 | ## 3.5.0
432 |
433 | ##### Added
434 | - Added [`appboy.addSdkMetadata()`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#addsdkmetadata) to allow self reporting of SDK Metadata fields via the [`appboy.BrazeSdkMetadata`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.brazesdkmetadata.html) enum.
435 | - Deprecated the [`appboy.stopWebTracking()`](https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html#stopWebTracking) method in favor of using [`appboy.disableSDK()`](https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html#disableSDK), which has the same functionality.
436 | - Deprecated the [`appboy.resumeWebTracking()`](https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html#resumeWebTracking) method in favor of using [`appboy.enableSDK()`](https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html#enableSDK), which has the same functionality.
437 | - Added getter method [`appboy.isDisabled()`](https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html#isDisabled) to determine if SDK has been disabled via [`appboy.disableSDK()`](https://js.appboycdn.com/web-sdk/latest/doc/module-appboy.html#disableSDK).
438 | - Accessibility improvements to in-app messages with scrollable text.
439 |
440 | ##### Changed
441 | - Calling `changeUser()` with an SDK Authentication signature will now update the signature when it is called with the current user's ID.
442 |
443 | ##### Fixed
444 | - Fixed an issue where removing the `ab-pause-scrolling` class was not sufficient to allow scrolling on touchscreen devices during the display of an in-app message.
445 |
446 | ## 3.4.1
447 |
448 | ##### Fixed
449 | - Fixed an issue introduced in 3.3.0 where event timestamps could become incorrect when a network request fails and the event is placed back in the queue.
450 |
451 | ## 3.4.0
452 |
453 | ##### Added
454 | - Added [`User.addToSubscriptionGroup()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.user.html#addtosubscriptiongroup) and [`User.removeFromSubscriptionGroup()`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.user.html#removefromsubscriptiongroup) to manage SMS/Email Subscription Groups.
455 |
456 | ##### Changed
457 | - Cards with subclass [`ControlCard`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.controlcard.html) are no longer counted in [`Feed.getUnreadCardCount`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.feed.html#getunreadcardcount) or [`ContentCards.getUnviewedCardCount`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.contentcards.html#getunviewedcardcount).
458 |
459 | ##### Fixed
460 | - Fixed an issue where globally-scoped CSS could cause the text and close button of In-App Messages to display incorrectly when using the built-in UI.
461 | - Fixed an accessibility issue with Content Cards where some feed children did not have the `article` role.
462 | - Fixed an issue where service worker network requests, including push click analytics, could not be made when SDK Authentication is enabled. If SDK Authentication is enabled and the service worker does not have a valid authentication signature, push click analytics will now be sent to the backend on the user's next session.
463 | - Fixed an issue where network requests that failed due to SDK Authentication errors did not use exponential backoff for retries.
464 | - Fixed an issue where iPads would be detected as Mac devices when using the "Request Desktop Site" iOS feature.
465 | - Fixed an issue where `aspectRatio` had an incorrect type in `Card` subclasses.
466 |
467 | ## 3.3.0
468 |
469 | ##### Added
470 | - Introduced support for new SDK Authentication feature.
471 | - Introduced an [`inAppMessageZIndex`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#initializationoptions.__type.inappmessagezindex) initialization option that allows you to easily customize the z-index of In-App Messages displayed by the built-in UI.
472 | - Added `successCallback` and `errorCallback` parameters to [`requestContentCardsRefresh`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#requestcontentcardsrefresh).
473 | - The SDK now logs deprecation warnings for deprecated methods and initialization options when logging is enabled.
474 | - Added support for `brazeBridge`, which has the same API as `appboyBridge`. `appboyBridge` is now deprecated but will continue to function.
475 | - Introduced support for the upcoming nested properties feature in [`appboy.logCustomEvent`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#logcustomevent) and [`appboy.logPurchase`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#logpurchase).
476 |
477 | ##### Changed
478 | - Removed `appboyQueue` replay snippet from the `npm` publication of the SDK. This avoids possible race conditions when referencing the SDK simultaneously from `npm` and the CDN, and removes use of `eval` from the `npm` package
479 | - [`appboy.logCustomEvent`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#logcustomevent) and [`appboy.logPurchase`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#logpurchase) now impose a 50KB limit on custom properties. If the supplied properties are too large, the event is not logged.
480 | - Deprecated the [`trackLocation`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#tracklocation) method in favor of using the native Geolocation API and passing the location data to ['User.setLastKnownLocation`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.user.html#setlastknownlocation). See our [public docs](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/analytics/location_tracking/) for more information.
481 | - Deprecated the [`enableHtmlInAppMessages`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#initializationoptions.__type.enablehtmlinappmessages) initialization option in favor of [`allowUserSuppliedJavascript`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#initializationoptions.__type.enablehtmlinappmessages). These options are functionally equivalent and no other changes are required.
482 |
483 | ##### Fixed
484 | - Fixed incorrect typing for [`User.setCountry`](https://js.appboycdn.com/web-sdk/latest/doc/classes/appboy.user.html#setcountry).
485 | - Added missing `dismissed` property to TypeScript definition and docs for `Card` subclasses.
486 |
487 | ## 3.2.0
488 |
489 | ##### Added
490 | - Added an optional `parentNode` parameter to [`appboy.display.hideContentCards`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.display.html#hidecontentcards) that allows you to specify a particular Content Cards feed to hide.
491 |
492 | ##### Changed
493 | - Cookies set by the SDK are now renewed when a new session is started. This fixes an issue where the SDK would stop setting cookies that had been deleted or expired when identification information existed in localStorage, preventing cross-subdomain identification from functioning in certain circumstances.
494 | - Increased clickable area of all buttons in the built-in UI to be at least 45x45px to comply with mobile accessibility best-practices. This includes some minor changes to the Content Cards and News Feed UI to accommodate the larger buttons.
495 |
496 | ##### Fixed
497 | - Fixed an issue where some network requests fail on websites using certain libraries that overwrite the native Promise object.
498 |
499 | ## 3.1.2
500 |
501 | ##### Fixed
502 | - Added default `alt` text to In-App Message and Content Card images to improve screen-reader experience.
503 | - Improved the display of different aspect ratios for `ClassicCard` images when using the built-in UI.
504 | - Fixed a regression introduced in 3.1.0 where the SDK would sometimes make multiple network requests when starting a new session.
505 | - Fixed an issue where globally-scoped `float` CSS caused certain elements of the built-in UI to display incorrectly.
506 | - Fixed an incorrect TypeScript definition for `DeviceProperties`.
507 |
508 | ## 3.1.1
509 |
510 | ##### Fixed
511 | - Fixed an issue where a javascript error could be thrown when showing Content Cards or In-App Messages in certain environments where `this` is undefined.
512 |
513 | ## 3.1.0
514 |
515 | ##### Added
516 | - Added a [`devicePropertyAllowlist`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#initializationoptions.__type.devicepropertyallowlist) initialization option. This new initialization option has the same functionality as `devicePropertyWhitelist`, which is now deprecated and will be removed in a future release.
517 |
518 | ##### Changed
519 | - Relaxed the email address validation used by the SDK in favor of the more accurate Braze backend validation. Valid addresses with unusual structures or international characters which were previously rejected will now be accepted.
520 |
521 | ##### Fixed
522 | - Fixed an issue where the SDK was improperly handling session starts when switching between subdomains, causing a short delay in triggering in-app messages.
523 |
524 | ## 3.0.1
525 |
526 | ##### Fixed
527 | - Fixed incorrect type definitions for the `extras` property of Card and In-App Message classes.
528 | - Fixed a regression introduced in 2.5.0 where the functionality of the `manageServiceWorkerExternally` and `disablePushTokenMaintenance` initialization options were swapped.
529 |
530 | ## 3.0.0
531 |
532 | ##### ⚠️ Breaking
533 | - The Braze Web SDK now comes bundled with TypeScript definitions in the `@braze` NPM packages. The TypeScript defintions include documentation and autocomplete in IDEs that support it, even if your project does not use TypeScript.
534 | - The following breaking changes have been made to allow for a better TypeScript experience:
535 | - The `ab` namespace has been removed. To migrate from previous integrations, you can simply find and replace all references to `appboy.ab` with `appboy`.
536 | - `InAppMessage.Button` has been renamed to `InAppMessageButton`. To migrate from previous integrations, you can simply find and replace all references to `InAppMessage.Button` with `InAppMessageButton`.
537 | - Due to the above changes, the SDK loading snippet has been updated. If you integrate the Braze Web SDK using the CDN, you must [update the loading snippet](https://github.com/Appboy/appboy-web-sdk#Alternative-CDN-installation) when upgrading to 3.0.
538 | - The `baseUrl` option to [`appboy.initialize`](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html#initialize) is now required to initialize the SDK. If your integration did not already provide the `baseUrl` option, it should now be set to the previous default value of `sdk.iad-01.braze.com` (e.g, `appboy.initialize('YOUR-API-KEY', { baseUrl: 'sdk.iad-01.braze.com' });`).
539 | - Removed the `messagingReadyCallback` from `openSession` and `changeUser`. Since 2.3.1, the SDK handles events that occur during the asynchronous portion of these calls gracefully, and ensures internally that only the latest messaging will be triggered. Any code previously being invoked inside this callback may be safely placed directly after the openSession or changeUser call.
540 |
541 | ##### Changed
542 | - The Braze Web SDK has brand new docs, which can be found [here](https://js.appboycdn.com/web-sdk/latest/doc/modules/appboy.html). Any URLs from the previous docs will redirect to the appropriate location.
543 |
544 | ##### Fixed
545 | - Fixed an issue where browser version was incorrectly reported in Android Webview.
546 |
547 | ## 2.7.1
548 |
549 | ##### Fixed
550 | - Fixed a regression introduced in 2.5.0 where the functionality of the `manageServiceWorkerExternally` and `disablePushTokenMaintenance` initialization options were swapped.
551 |
552 | ## 2.7.0
553 |
554 | ##### Added
555 | - Added [`appboyBridge.getUser().addAlias(alias, label)`](https://www.braze.com/docs/user_guide/message_building_by_channel/in-app_messages/customize/#javascript-bridge) to HTML In-App Messages.
556 |
557 | ##### Changed
558 | - The Braze Web SDK now uses [User-Agent Client Hints](https://wicg.github.io/ua-client-hints/#interface) for device detection when available. When using User-Agent Client Hints, browser version detection is limited to the significant version (e.g., 85 instead of 85.0.123.0). Note that this upgrade will be necessary to ensure accurate operating system detection in upcoming versions of Chromium-based browsers.
559 | - Cards received from the Content Cards test send feature of the Braze dashboard are no longer removed when the SDK receives an update to the user's Content Cards.
560 |
561 | ##### Fixed
562 | - Removed code that could result in javascript errors in certain webpack configurations where the `global` object is not accessible by the SDK.
563 | - Fixed an issue where the `ab.Card` methods `removeAllSubscriptions`, `removeSubscription`, `subscribeToClickedEvent`, and `subscribeToDismissedEvent` were minified, resulting in `undefined` when called.
564 |
565 | ## 2.6.0
566 |
567 | ##### Added
568 | - Introduced new NPM packages under the `@braze` scope. The core and full versions of the SDK as well as the service worker are now published in their own packages, resulting in a drastically reduced install size compared to the `appboy-web-sdk` package. This is not a breaking change for existing NPM integrations and we will continue to publish the `appboy-web-sdk` package to maintain backwards compatibility. See the README for integration details.
569 | - Added [`appboyBridge.getUser().setLanguage(language)`](https://www.braze.com/docs/user_guide/message_building_by_channel/in-app_messages/customize/#javascript-bridge) to HTML In-App Messages.
570 |
571 | ##### Changed
572 | - The new HTML In-App Message type now allows multiple clicks to be logged for a given message.
573 |
574 | ##### Fixed
575 | - Made push-related methods more defensive against edge-cases where `Notification` is not defined.
576 | - Fixed an issue where unexpected backend responses could result in a javascript error.
577 | - Fixed an issue in recent versions of Safari where calling `appboy.registerAppboyPushMessages` would throw a javascript error if the user did not allow websites to ask for permission to send notifications.
578 |
579 | ## 2.5.2
580 |
581 | ##### Fixed
582 | - Fixed an issue that could cause some prerender user agents to fail to be appropriately recognized as a web crawler.
583 |
584 | ##### Changed
585 | - Data will now be flushed to the Braze backend every 3 seconds on Safari (down from 10 seconds) due to new privacy features that clear localStorage after 7 days of inactivity.
586 |
587 | ## 2.5.1
588 |
589 | ##### Fixed
590 | - Fixed an issue in Content Cards where `getUnviewedCardCount()` returns `undefined`. This issue was introduced in 2.5.0.
591 |
592 | ## 2.5.0
593 |
594 | ##### Added
595 | - Introduced support for upcoming HTML In-App Message templates.
596 | - Added [`appboyBridge.logClick()`](https://www.braze.com/docs/user_guide/message_building_by_channel/in-app_messages/customize/#javascript-bridge) to HTML In-App Messages.
597 | - Expanded browser detection to include UC Browser and newer versions of Microsoft Edge that are based on Chromium.
598 | - Added a new variant of the SDK that allows sites using RequireJS to load the SDK through another method, such as NPM or a `