@mparticle/web-braze-kit 3.0.5 → 3.0.6
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 +3 -0
- package/README.md +18 -28
- package/dist/BrazeKit.common.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
--
|
|
4
4
|
|
|
5
|
+
#### 3.0.5 - 2023-02-15
|
|
6
|
+
- refactor: Update console warning and readme to reflect new rollout plans (#19)
|
|
7
|
+
|
|
5
8
|
#### 3.0.5 - 2022-10-20
|
|
6
9
|
- docs: Update README to alert developers about v4 kit upgrade date, add console warning to current CDN users (#15)
|
|
7
10
|
|
package/README.md
CHANGED
|
@@ -1,52 +1,42 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
3
|
⚠️⚠️⚠️
|
|
4
|
-
# Notice!
|
|
5
|
-
|
|
4
|
+
# 2/14/2023 Notice! Opt in for Breaking Changes to mParticle Web Braze Kit coming soon
|
|
5
|
+
mParticle's Braze Kit currently uses Braze's V3 web SDK, and Braze has made significant changes to their newest V4 web SDK. Previously, mParticle planned to release an update on 2/15/2023 for all of our CDN users which upgraded to the Brave V4 web SDK. Now, rather than migrate all CDN users to V4 at the same time, you must opt in to get the latest update. This will allow you to decide when you want to upgrade to V4 and make the appropriate code changes. Opting in to V4 will be done via a connection setting in the mParticle UI that will be available shortly.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
* <b>Note that if you are here looking at source code, the `master` branch will continue to contain Braze Web Kit version 3.X until 2/15/2023. The `braze-v4-npm-master` branch currently contains the source code for v4.X, and this will be merged to `master` on 2/15/2023 to be available via CDN. </b>
|
|
9
|
-
* If you are using version 2 of the @mparticle/web-appboy-kit, you will need to <a href="#transition-from-mparticleweb-appboy-kit-to-mparticleweb-braze-kit">transition to @mparticle/web-braze-kit per the instructions here</a> before following the below instructions as well.
|
|
10
|
-
|
|
11
|
-
## Braze Web Kit Citical Updates and Timelines
|
|
7
|
+
For now, no code changes are needed, but if you implemented the code examples outlined in our docs and earlier communications, you can continue to use the V3 code until you opt in to V4 manually. More details on that are coming soon.
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
If you self-host mParticle and the Braze Web Kit via npm, you can update sooner. Follow the instructions below for if you self-host or if you are on CDN and getting ready to opt in.
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
* <b>Note that if you are here looking at source code, the `master` branch will continue to contain Braze Web Kit version 3.X until the opt in option is available. The `braze-v4-npm-master` branch currently contains the source code for v4.X.</b>
|
|
12
|
+
* If you are using version 2 of the @mparticle/web-appboy-kit, you will need to <a href="#transition-from-mparticleweb-appboy-kit-to-mparticleweb-braze-kit">transition to @mparticle/web-braze-kit per the instructions here</a> before following the below instructions as well.
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
| ---|---|---|---|
|
|
19
|
-
| v4.0.0 | v4.2.1 | 2/15/2023 | [Link](#update-to-braze-sdk-version-4-from-version-3---10152022---2152023) |
|
|
20
|
-
| v3.0.4 | v3.5.0 | NA | [Link](#transition-from-mparticleweb-appboy-kit-to-mparticleweb-braze-kit) |
|
|
14
|
+
## Braze Web Kit Citical Updates and Timelines
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
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.
|
|
23
17
|
|
|
24
18
|
Please review [Braze’s Changelog notes](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/changelog#400) as well as Braze’s [migration guide](https://github.com/braze-inc/braze-web-sdk/blob/master/UPGRADE_GUIDE.md) between version 3 and 4 to understand these changes and what code updates are needed from your side. The largest change is the move from class name `appboy` to `braze`. Braze also removed and renamed some APIs. As a result, we are also updating our mParticle Braze web kit from 3.0.X to 4.0.X in order to support Braze’s Web SDK version 4.2.1.
|
|
25
19
|
|
|
26
|
-
|
|
27
|
-
* Customers who self-host mParticle via npm - You
|
|
28
|
-
* Customers who load mParticle via snippet/CDN -
|
|
29
|
-
|
|
30
|
-
We want to allow our customers to take advantage of the latest from Braze, so we are releasing the kit update via npm earlier. However, due to the sensitive nature of the breaking changes in Braze’s latest version, we want to give ample notice to all of our customers who are on the CDN since these customers will get the update automatically. We want to respect the end-of-year code freezes that a lot of our customers have and allow plenty of time to make the required code changes. Striking this balance is important for us, so if you are on the CDN but need the update sooner, you can [switch to self-hosting on npm](https://docs.mparticle.com/developers/sdk/web/self-hosting/).
|
|
20
|
+
Customers will be able to opt in to using the latest version of Braze's Web SDK both via npm and via snippet/CDN
|
|
21
|
+
* Customers who self-host mParticle via npm - You can use @mparticle/web-braze-kit version 4.0.0 in your package.json now! This has been available since 10/15/2022.
|
|
22
|
+
* Customers who load mParticle via snippet/CDN - Opting in will be available soon via the mParticle UI in your Braze connection settings.
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
The following recommendations apply only to customers who load mParticle via snippet. Customers who self-host via npm can ignore step 1 and jump straight to step 3 after updating their mParticle Braze kit. Note that this is only one example. Everywhere you manually call `appboy` needs to be updated similar to the below, and please refer to the Braze Changelog and migration guide as referenced earlier:
|
|
24
|
+
Note that the following is only one example. Everywhere you manually call `appboy` needs to be updated similar to the below.
|
|
35
25
|
|
|
36
26
|
* 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:
|
|
37
27
|
```javascript
|
|
38
28
|
window.appboy.display.destroyFeed();
|
|
39
29
|
```
|
|
40
30
|
|
|
41
|
-
Step 2: Roll out code changes to be used before
|
|
31
|
+
Step 2: Roll out code changes to be used before you opt in to using Version 4 of the Braze Web SDK so that it works under both versions:
|
|
42
32
|
```javascript
|
|
43
33
|
if (window.appboy) {
|
|
44
|
-
window.appboy.display.destroyFeed();
|
|
45
|
-
} else if (window.braze) {
|
|
46
|
-
|
|
47
|
-
}
|
|
34
|
+
window.appboy.display.destroyFeed();
|
|
35
|
+
} else if (window.braze) {
|
|
36
|
+
window.braze.destroyFeed();
|
|
37
|
+
}
|
|
48
38
|
```
|
|
49
|
-
Step 3: After
|
|
39
|
+
Step 3: After opting in to Version 4 of the Braze Web SDK, you can simplify your code:
|
|
50
40
|
```javascript
|
|
51
41
|
window.braze.destroyFeed();
|
|
52
42
|
```
|
package/dist/BrazeKit.common.js
CHANGED
|
@@ -305,7 +305,7 @@ window.appboy = appboy_min;
|
|
|
305
305
|
|
|
306
306
|
var name = 'Appboy',
|
|
307
307
|
moduleId = 28,
|
|
308
|
-
version = '3.0.
|
|
308
|
+
version = '3.0.6',
|
|
309
309
|
MessageType = {
|
|
310
310
|
PageView: 3,
|
|
311
311
|
PageEvent: 4,
|
|
@@ -729,7 +729,7 @@ var constructor = function () {
|
|
|
729
729
|
customFlags
|
|
730
730
|
) {
|
|
731
731
|
console.warn(
|
|
732
|
-
'mParticle
|
|
732
|
+
'mParticle will soon update the Braze web kit and upgrade the Braze SDK that you are currently using from V3 to V4. This will be an opt-in update, but we recommend you opt in when the update is available to get the latest bug fixes and features from Braze. Please see https://docs.mparticle.com/integrations/braze/event for more information and necessary upgrade steps when you decide to opt in.'
|
|
733
733
|
);
|
|
734
734
|
// check to see if there is a logger for backwards compatibility, and if not, mock one to avoid errors
|
|
735
735
|
if (!self.logger) {
|
package/package.json
CHANGED