From 95c08ff4d81bf7cc036bf159ea1009ce121e18ba Mon Sep 17 00:00:00 2001 From: Jaissica Date: Tue, 24 Mar 2026 13:46:21 -0400 Subject: [PATCH 1/3] updatw README for v5 --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 107f5f3..e1af40b 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ ![Braze Logo](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy/blob/master/braze-logo.png) ⚠️⚠️⚠️ -# Notice! Opt in is now available for Braze Web SDK V4 - Action Required +# Notice! Opt in is now available for Braze Web SDK V5 - Action Required You can now select what version of the Braze SDK you want to use when setting up a Braze connection in the mParticle UI. Braze occasionally makes breaking changes to their SDK, so if you call `appboy` directly in your code, you will have to update your code to ensure your website performs as expected when updating versions of Braze. -Please review the [Braze Changelog](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog#400) and [V4 migration guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) to learn about the differences between V3 and V4 and what changes you will need to make in your code. The most significant breaking changes are the replacement of the `appboy` class name with `braze`, in addition to the removal and renaming of several APIs. +Please review the [Braze Changelog](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog#500) and [V5 migration guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) to learn about the differences between V4 and V5 and what changes you will need to make in your code. The most significant breaking changes are the replacement of the `appboy` class name with `braze`, in addition to the removal and renaming of several APIs. You can opt into the latest major version of the Braze Web SDK whether you implement mParticle's Web SDK using npm or our snippet/CDN. -* Customers who self-host mParticle via npm - You should add @mparticle/web-braze-kit version 4.0.0 or greater in your package.json. You must also select `Version 4` under `Braze Web SDK Version` in the Braze connection settings. -* Customers who load mParticle via snippet/CDN - You must select `Version 4` under `Braze Web SDK Version` in the Braze connection settings. +* Customers who self-host mParticle via npm - You should add @mparticle/web-braze-kit version 5.0.0 or greater in your package.json. You must also select `Version 5` under `Braze Web SDK Version` in the Braze connection settings. +* Customers who load mParticle via snippet/CDN - You must select `Version 5` under `Braze Web SDK Version` in the Braze connection settings. Note that the following is only one example. Everywhere you manually call `appboy` needs to be updated similar to the below. If you are using NPM, you can skip to step 3. Please be sure to test your site fully in development prior to releasing. @@ -19,7 +19,7 @@ Note that the following is only one example. Everywhere you manually call `appb window.appboy.display.destroyFeed(); ``` -Step 2: Roll out code changes prior to opting in to V4 +Step 2: Roll out code changes prior to opting in to V5 ```javascript if (window.appboy) { window.appboy.display.destroyFeed(); @@ -27,7 +27,7 @@ if (window.appboy) { window.braze.destroyFeed(); } ``` -Step 3: Whether you are using the snippet or self hosting, you need to navigate to your Braze connection settings and select `Version 4` from the `Braze Web SDK Version` drop down. +Step 3: Whether you are using the snippet or self hosting, you need to navigate to your Braze connection settings and select `Version 5` from the `Braze Web SDK Version` drop down. Step 4: After you opt in, you can simplify your code. We recommend testing and waiting at least 24 hours between opting in and removing previous instances of `appboy` and doing thorough testing of your application in a development environment to ensure everything is working: ```javascript @@ -35,15 +35,15 @@ window.braze.destroyFeed(); ``` Step 5: Push Notifications via service-worker.js -If you use Push Notifications, we have updated the `service-worker.js` file. In our testing, Braze’s push notifications work as expected regardless of what version of the service-worker is used, but we recommend updating this file to ensure future compatibility. In your `service-worker.js` file, update the code to reference `https://static.mparticle.com/sdk/js/braze/service-worker-4.2.0.js` instead of `https://static.mparticle.com/sdk/js/braze/service-worker-3.5.0.js`. Your `service-worker.js` file should now contain: +If you use Push Notifications, we have updated the `service-worker.js` file. In our testing, Braze’s push notifications work as expected regardless of what version of the service-worker is used, but we recommend updating this file to ensure future compatibility. In your `service-worker.js` file, update the code to reference `https://static.mparticle.com/sdk/js/braze/service-worker-5.5.0.js` instead of `https://static.mparticle.com/sdk/js/braze/service-worker-4.2.0.js`. Your `service-worker.js` file should now contain: ```javascript -self.imports('https://static.mparticle.com/sdk/js/braze/service-worker-4.2.0.js') +self.importScripts('https://static.mparticle.com/sdk/js/braze/service-worker-5.5.0.js') ``` ### Transition from @mparticle/web-appboy-kit to @mparticle/web-braze-kit -The legacy @mparticle/web-appboy-kit from npm includes version 2 of the Braze Web SDK. As part of this update, we've created a new [Braze web kit repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze) to replace our deprecated [Appboy web kit repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy). If you are still using `@mparticle/web-appboy-kit`, you will need to consider the breaking changes Braze made between V2 and V3 of the Braze SDK (found [here](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog/#300)) as well as the instructions above to get from V2 to V4 of the Braze SDK. +The legacy @mparticle/web-appboy-kit from npm includes version 2 of the Braze Web SDK. As part of this update, we've created a new [Braze web kit repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze) to replace our deprecated [Appboy web kit repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy). If you are still using `@mparticle/web-appboy-kit`, you will need to consider the breaking changes Braze made between V2 and V3 of the Braze SDK (found [here](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog/#300)) as well as the instructions above to get from V2 to V5 of the Braze SDK. From 48f449cc99519344d35083546a3ff14ac4d25c9c Mon Sep 17 00:00:00 2001 From: Jaissica Date: Tue, 24 Mar 2026 14:56:38 -0400 Subject: [PATCH 2/3] clean up README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e1af40b..f1d54ec 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ ⚠️⚠️⚠️ # Notice! Opt in is now available for Braze Web SDK V5 - Action Required -You can now select what version of the Braze SDK you want to use when setting up a Braze connection in the mParticle UI. Braze occasionally makes breaking changes to their SDK, so if you call `appboy` directly in your code, you will have to update your code to ensure your website performs as expected when updating versions of Braze. +You can now select what version of the Braze SDK you want to use when setting up a Braze connection in the mParticle UI. Braze occasionally makes breaking changes to their SDK, so if you call `braze` directly in your code, you will have to update your code to ensure your website performs as expected when updating versions of Braze. -Please review the [Braze Changelog](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog#500) and [V5 migration guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) to learn about the differences between V4 and V5 and what changes you will need to make in your code. The most significant breaking changes are the replacement of the `appboy` class name with `braze`, in addition to the removal and renaming of several APIs. +Please review the [Braze Changelog](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog#500) and [V5 migration guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) to learn about the differences between V4 and V5 and what changes you will need to make in your code. The most significant breaking changes are the removal of the deprecated `enableHtmlInAppMessages` initialization option (replaced by `allowUserSuppliedJavascript`), in addition to the removal and renaming of several APIs. You can opt into the latest major version of the Braze Web SDK whether you implement mParticle's Web SDK using npm or our snippet/CDN. * Customers who self-host mParticle via npm - You should add @mparticle/web-braze-kit version 5.0.0 or greater in your package.json. You must also select `Version 5` under `Braze Web SDK Version` in the Braze connection settings. @@ -14,7 +14,7 @@ You can opt into the latest major version of the Braze Web SDK whether you imple Note that the following is only one example. Everywhere you manually call `appboy` needs to be updated similar to the below. If you are using NPM, you can skip to step 3. Please be sure to test your site fully in development prior to releasing. -* Step 1: Legacy code sample. Find all the places where your code references the `appboy.display` namespace. Braze has removed all instances of the `display` namespace: +* Step 1: Legacy code sample. Find all the places where your code references the `appboy.display` namespace. Braze has removed all instances of the `display` namespace: ```javascript window.appboy.display.destroyFeed(); ``` From 751a675a1093228804920fb8668d7c8b75cfa692 Mon Sep 17 00:00:00 2001 From: Jaissica Date: Tue, 24 Mar 2026 16:47:36 -0400 Subject: [PATCH 3/3] address PR comment --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index f1d54ec..34f53fb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ You can opt into the latest major version of the Braze Web SDK whether you imple * Customers who self-host mParticle via npm - You should add @mparticle/web-braze-kit version 5.0.0 or greater in your package.json. You must also select `Version 5` under `Braze Web SDK Version` in the Braze connection settings. * Customers who load mParticle via snippet/CDN - You must select `Version 5` under `Braze Web SDK Version` in the Braze connection settings. -Note that the following is only one example. Everywhere you manually call `appboy` needs to be updated similar to the below. If you are using NPM, you can skip to step 3. Please be sure to test your site fully in development prior to releasing. +Note that the following is only one example of migrating from V3 to V5. Everywhere you manually call `appboy` needs to be updated similar to the below. If you are using NPM, you can skip to step 3. Please be sure to test your site fully in development prior to releasing. * Step 1: Legacy code sample. Find all the places where your code references the `appboy.display` namespace. Braze has removed all instances of the `display` namespace: @@ -41,12 +41,6 @@ If you use Push Notifications, we have updated the `service-worker.js` file. In self.importScripts('https://static.mparticle.com/sdk/js/braze/service-worker-5.5.0.js') ``` -### Transition from @mparticle/web-appboy-kit to @mparticle/web-braze-kit - -The legacy @mparticle/web-appboy-kit from npm includes version 2 of the Braze Web SDK. As part of this update, we've created a new [Braze web kit repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze) to replace our deprecated [Appboy web kit repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy). If you are still using `@mparticle/web-appboy-kit`, you will need to consider the breaking changes Braze made between V2 and V3 of the Braze SDK (found [here](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog/#300)) as well as the instructions above to get from V2 to V5 of the Braze SDK. - - - # License