@mparticle/web-braze-kit
Advanced tools
+2
-2
| { | ||
| "name": "@mparticle/web-braze-kit", | ||
| "version": "5.0.1", | ||
| "version": "6.0.0", | ||
| "author": "mParticle Developers <developers@mparticle.com> (https://www.mparticle.com)", | ||
@@ -37,3 +37,3 @@ "description": "mParticle integration sdk for Braze", | ||
| "dependencies": { | ||
| "@braze/web-sdk": "^5.5.0", | ||
| "@braze/web-sdk": "^6.0.0", | ||
| "@mparticle/web-sdk": "^2.23.0" | ||
@@ -40,0 +40,0 @@ }, |
+11
-36
|  | ||
| ⚠️⚠️⚠️ | ||
| # Notice! Opt in is now available for Braze Web SDK V4 - Action Required | ||
| # Notice! Opt in is now available for Braze Web SDK V6 - 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#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#600) and [V6 migration guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) to learn about the differences between V5 and V6 and what changes you will need to make in your code. The most significant breaking change is the removal of the legacy News Feed feature and associated methods (e.g. `destroyFeed()`, `toggleFeed()`, `showFeed()`), in addition to the removal and renaming of several other APIs. There may be API changes that affect you if you call `braze` directly from your code. | ||
| 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 6.0.0 or greater in your package.json. You must also select `Version 6` under `Braze Web SDK Version` in the Braze connection settings. | ||
| * Customers who load mParticle via snippet/CDN - You must select `Version 6` 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. | ||
| Step 1: Whether you are using the snippet or self hosting, you need to navigate to your Braze connection settings and select `Version 6` from the `Braze Web SDK Version` drop down. | ||
| Step 2: Remove or replace any calls to removed APIs (e.g. News Feed methods such as `destroyFeed()`, `toggleFeed()`, `showFeed()`) and update any renamed APIs per the migration guide. We recommend testing thoroughly in a development environment before 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: | ||
| ```javascript | ||
| window.appboy.display.destroyFeed(); | ||
| ``` | ||
| Step 3: Push Notifications via service-worker.js | ||
| If you use Push Notifications, your `service-worker.js` file should be updated to reference `https://static.mparticle.com/sdk/js/braze/service-worker-6.5.0.js` instead of `https://static.mparticle.com/sdk/js/braze/service-worker-5.5.0.js`. Your `service-worker.js` file should now contain: | ||
| Step 2: Roll out code changes prior to opting in to V4 | ||
| ```javascript | ||
| if (window.appboy) { | ||
| window.appboy.display.destroyFeed(); | ||
| } else if (window.braze) { | ||
| window.braze.destroyFeed(); | ||
| } | ||
| self.importScripts('https://static.mparticle.com/sdk/js/braze/service-worker-6.5.0.js') | ||
| ``` | ||
| 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 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 | ||
| 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: | ||
| ```javascript | ||
| self.imports('https://static.mparticle.com/sdk/js/braze/service-worker-4.2.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. | ||
| # License | ||
@@ -65,2 +40,2 @@ | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| limitations under the License. |
-103
| ## Releases | ||
| -- | ||
| ## 5.0.1 - 2024-11-13 | ||
| - ci: Add esm support [#53](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/53) | ||
| - fix: Update package.json to support esm, define missing variable declarations [#54](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/54) | ||
| ## 5.0.0 - 2024-10-30 | ||
| ⚠️ **Breaking** - The mParticle web Braze kit now supports Braze's Web SDK v5.5.0. Breaking changes cna be viewed at [Braze's changelog](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog/#500). There may be API changes that affect you if you call `braze` directly from your code. | ||
| - feat: Support Braze Web SDK V5 [#52)](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/52) | ||
| * Full details about the changes and recommended code changes can be found on mParticle's [Braze integration docs page](https://docs.mparticle.com/integrations/braze/event). | ||
| ## 4.2.0 - 2024-10-24 | ||
| - fix: Report purchase events to mParticle when bundling ecommerce data [#50](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/50) | ||
| - feat: Implement Google EU Consent [#51](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/51) | ||
| ## 4.1.5 - 2024-05-07 | ||
| - fix: Allow any userIdentificationType to be used when initializing kit (#48) | ||
| ## 4.1.4 - 2024-01-24 | ||
| - fix: Forward SKU as product name when ecommerce events are bundled [#47](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/47) | ||
| ## 4.1.3 - 2023-09-25 | ||
| - fix: Add custom logging for onUserIdentified [#42](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/42)) | ||
| ## 4.1.2 - 2023-07-25 | ||
| - fix: Set MPID before open session ([#41](https://github.com/mparticle-integrations/mparticle-javascript-integration-braze/pull/41)) | ||
| ## 4.1.1 - 2023-06-30 | ||
| - fix: Support bundling products, impressions, and promotions as a single event (#36) | ||
| ## 4.1.0 - 2023-06-28 | ||
| - feat: Support bundling products, impressions, and promotions as a single event (#36) | ||
| ## 4.0.2 - 2023-06-26 | ||
| - fix: Update @mparticle/web-sdk version in package.json | ||
| - ci: Update node version (#35) | ||
| - docs: Update readme to include Braze V4 SDK option (#28) | ||
| ## 4.0.1 - 2023-06-12 | ||
| - fix: Add suffix of v4 to forwarder (#21) | ||
| ## 4.0.0 - 2022-10-19 | ||
| ⚠️ **Breaking** - The mParticle web Braze kit now supports Braze's Web SDK V4.2.1. | ||
| * Our partner, Braze, has made significant changes to their web SDK. As a result, we are also updating our mParticle Braze web kit to support Braze’s Web SDK version 4.2.1. The updated mParticle Braze Web kit will be available via CDN on Feb 15, 2023 and is currently available on npm at @mparticle/web-braze-kit v4.0.0. | ||
| * There are lots of breaking changes, most notably Braze deprecating the entire `appboy` namespace in favor of `braze`, so please proceed with caution when updating to v4.0.0 via NPM. If you implement mParticle via snippet, you will have to make changes to your codebase before Feb 15, 2023 to be compatible with both version 3 and version 4 of the Braze SDK to ensure your code continues to work. | ||
| * Full details about the changes and recommended code changes can be found on mParticle's [Braze integration docs page](https://docs.mparticle.com/integrations/braze/event). | ||
| #### 3.0.4 - 2022-09-06 | ||
| - fix: Add Transaction Id to Purchase Commerce Events | ||
| #### 3.0.3 - 2022-08-24 | ||
| - feat: Add logging for debugging | ||
| #### 3.0.2 - 2022-06-16 | ||
| - fix: add register_inapp and pushPrimer variables | ||
| #### 3.0.1 - 2022-05-18 | ||
| - consume initOptions customFlags - this allows a customer to pass a callback to include additional options that mParticle doesn't support in the UI | ||
| #### 3.0.0 - 2022-03-28 | ||
| ⚠️ **Breaking** - If you reference any of the below deprecations and implement mParticle via snippet, you will have to make changes to your codebase before June 8, 2022 to be compatible with both version 2 and version 3 of the Braze SDK to ensure your code continues to work. | ||
| * Our partner, Braze, has made a few significant changes to their web SDK. As a result, we are also updating our mParticle Braze web kit to support Braze’s Web SDK version 3.5.0, which includes breaking changes to the Braze SDK behavior. The updated mParticle Braze Web kit will be available via CDN on June 8, 2022 and is currently available on NPM at @mparticle/web-braze-kit v3.0.0. Also note that we have updated the name of our npm package from @mparticle/web-appboy-kit to @mparticle/web-braze-kit. | ||
| * We highly recommend that you review the changes between version 2 and 3 of the Braze Web SDK to understand these changes, which can be found here. To summarize: | ||
| * The `appboy.ab` namespace has been removed and everything lives under the `appboy` namespace now. | ||
| * `InAppMessage.Button` has been renamed to `InAppMessageButton` | ||
| * Full details can be found in the README at our [AppBoy Repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy#readme). | ||
| #### 2.0.7 - 2022-02-09 | ||
| - Feat - add new Braze clusters | ||
| #### 2.0.6 - 2020-12-10 | ||
| - Feat - Add additional Braze clusters to URL mapping table | ||
| #### 2.0.5 - 2020-06-04 | ||
| - Update Braze to 2.5.2 | ||
| #### 2.0.4 - 2020-02-12 | ||
| - Send SKU if forwardSkuAsProductName is set | ||
| #### 2.0.2 - 2020-01-23 | ||
| - Feat - Set event name sent to Braze as user provided pageName | ||
| #### 2.0.1 - 2019-12-03 | ||
| - Bugfix - Respect userId choice in mParticle UI dropdown | ||
| - Add version number | ||
| - Remove isObject dependency |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
807958
12.05%24525
11.63%4
-20%41
-36.92%8
33.33%1
Infinity%+ Added
- Removed
Updated