@penguin-wolf/braze-integration 2.0.2 → 2.0.3
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/README.md +13 -1
- package/braze-integration.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
## Basic Usage
|
|
2
2
|
1. install using `npm i @penguinwolf/braze-integration`
|
|
3
3
|
2. import into your project and construct the integration
|
|
4
4
|
```js
|
|
@@ -17,3 +17,15 @@ braze.logCustomEvent('set_location', {
|
|
|
17
17
|
location: 'QLD',
|
|
18
18
|
});
|
|
19
19
|
```
|
|
20
|
+
|
|
21
|
+
## Updating the Braze SDK
|
|
22
|
+
1. Clone this repo
|
|
23
|
+
2. Run `npm i @braze/web-sdk@latest` to update the Braze SDK to the latest
|
|
24
|
+
3. Increment the package version in `package.json`, run `npm i` to update `package-lock.json`
|
|
25
|
+
4. Commit and then tag with the new version like so `git tag -a v2.0.1`, changing the version to match `package.json`
|
|
26
|
+
5. Push changes and tags: `git push && git push --tags`
|
|
27
|
+
6. Publish to npm with `npm publish` (note: you will need to be authenticated with the @penguin-wolf npm account)
|
|
28
|
+
7. In a project that uses this module use `npm outdated` to check for updates and `@penguin-wolf/braze-integration` to install the latest version of this module. Rebuild and deploy as normal
|
|
29
|
+
|
|
30
|
+
## TODO
|
|
31
|
+
- [ ] Make warning for "multiple braze versions loaded" explicitly say which version is already loaded and which version we are trying to load now
|
package/braze-integration.js
CHANGED
|
@@ -62,7 +62,7 @@ if(!window.BrazeIntegration) {
|
|
|
62
62
|
|
|
63
63
|
// Remove parameter from URL
|
|
64
64
|
urlParams.delete('external_id');
|
|
65
|
-
window.history.replaceState({}, document.title, window.location.pathname
|
|
65
|
+
window.history.replaceState({}, document.title, window.location.pathname+"?"+urlParams.toString());
|
|
66
66
|
|
|
67
67
|
return external_id;
|
|
68
68
|
}
|