@mparticle/web-braze-kit 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,38 @@
1
+ ## Releases
2
+
3
+ --
4
+
5
+ #### 3.0.0 - 2022-03-28
6
+
7
+ ⚠️ **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.
8
+ * 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.
9
+ * 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:
10
+ * The `appboy.ab` namespace has been removed and everything lives under the `appboy` namespace now.
11
+ * `InAppMessage.Button` has been renamed to `InAppMessageButton`
12
+ * Full details can be found in the README at our [AppBoy Repo](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy#readme).
13
+
14
+ #### 2.0.7 - 2022-02-09
15
+
16
+ - Feat - add new Braze clusters
17
+
18
+ #### 2.0.6 - 2020-12-10
19
+
20
+ - Feat - Add additional Braze clusters to URL mapping table
21
+
22
+ #### 2.0.5 - 2020-06-04
23
+
24
+ - Update Braze to 2.5.2
25
+
26
+ #### 2.0.4 - 2020-02-12
27
+
28
+ - Send SKU if forwardSkuAsProductName is set
29
+
30
+ #### 2.0.2 - 2020-01-23
31
+
32
+ - Feat - Set event name sent to Braze as user provided pageName
33
+
34
+ #### 2.0.1 - 2019-12-03
35
+
36
+ - Bugfix - Respect userId choice in mParticle UI dropdown
37
+ - Add version number
38
+ - Remove isObject dependency
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ ![Braze Logo](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy/blob/master/braze-logo.png)
2
+
3
+ ⚠️⚠️⚠️
4
+ # Notice! Timeline for Breaking Changes for mParticle Web Braze Kit- 3/28/2022 - 6/8/2022
5
+ This repository renames and replaces our [mParticle Appboy Web Kit](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy), which will be archived in the future.
6
+
7
+ Braze has breaking changes between version 2.5.2 and 3.5.0 of their SDK. As a result, we too are updating our [mParticle Braze web kit](https://github.com/mparticle-integrations/mparticle-javascript-integration-appboy) to support Braze’s Web SDK version 3.5.0. The updated mParticle Braze Web kit will be available via CDN on June 8, 2022 and is currently available on NPM as [@mparticle/web-braze-kit](https://www.npmjs.com/package/@mparticle/web-braze-kit) v3.0.0.
8
+
9
+ **How do you know if your code is affected?**
10
+
11
+ You may notice errors on your site if you load mParticle [via snippet](https://docs.mparticle.com/developers/sdk/web/getting-started/#add-the-sdk-snippet) (as most of our clients do), and you reference any deprecated Braze APIs starting 6/8/2022.
12
+
13
+ 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](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog/#300). To summarize:
14
+ * The `appboy.ab` namespace has been removed and everything lives under the `appboy` namespace now.
15
+ * `InAppMessage.Button` has been renamed to `InAppMessageButton`
16
+
17
+ If you reference any of the above deprecations, you will have to makes 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. We recommend a 3 step approach. Here are some code samples of what this code could look like today (step 1), preparing for the update (step 2) and after the change is live (step 3).
18
+
19
+ The below recommendations apply only to customers who load mParticle [via snippet](https://docs.mparticle.com/developers/sdk/web/getting-started/#add-the-sdk-snippet). Customers who [self host via NPM](https://docs.mparticle.com/developers/sdk/web/self-hosting/) can ignore step 1 and jump straight to step 3 after updating their mParticle Braze kit to v3.0.0.
20
+
21
+ Step 1: Legacy code sample. If your code references the `ab` namespace (like below) or `InAppMessage.Button`, you should change it following Step 2’s example:
22
+ ```javascript
23
+ let banner = new appboy.ab.Banner(‘test’);
24
+ ```
25
+
26
+ Step 2: Rollout code sample to be used before June 8, 2022:
27
+ ```javascript
28
+ let banner;
29
+ if (appboy.hasOwnProperty(‘ab’)) {
30
+ banner = new appboy.ab.Banner(‘test’);
31
+ } else {
32
+ banner = new appboy.Banner(‘test’);
33
+ }
34
+ ```
35
+ Step 3: After June 8, 2022, you can simplify your code to the following once the mParticle Braze Web kit has been released to our CDN:
36
+ ```javascript
37
+ let banner = new appboy.Banner(‘test’);
38
+ ```
39
+
40
+ **Push Notifications via service-worker.js**
41
+
42
+ Additionally, if you are using 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 to ensure future compatibility. In your `service-worker.js` file, update the code to reference `https://static.mparticle.com/sdk/js/braze/service-worker-3.5.0.js` instead of `https://static.mparticle.com/sdk/js/braze/service-worker.js`, ie:
43
+
44
+ ```javascript
45
+ self.importScripts('https://static.mparticle.com/sdk/js/braze/service-worker-3.5.0.js');
46
+ ```
47
+
48
+ # License
49
+
50
+ Copyright 2022 mParticle, Inc.
51
+
52
+ Licensed under the Apache License, Version 2.0 (the "License");
53
+ you may not use this file except in compliance with the License.
54
+ You may obtain a copy of the License at
55
+
56
+ http://www.apache.org/licenses/LICENSE-2.0
57
+
58
+ Unless required by applicable law or agreed to in writing, software
59
+ distributed under the License is distributed on an "AS IS" BASIS,
60
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
61
+ See the License for the specific language governing permissions and
62
+ limitations under the License.