![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@braze/web-sdk-core
Advanced tools
$ npm install --save @braze/web-sdk-core
This will install the Braze Web SDK files into ./node_modules/@braze/web-sdk-core
where you can reference them locally. Note that the Braze Web SDK is meant to be used client-side in a web application and may not work as expected in a Node.js server environment.
Note that this core version of the SDK does not contain any of Braze's built-in UI capabilities (any appboy.display methods). You will need to implement your own UI for In-App Messaging and Content Cards. Note that our UI elements are fully customizable via css, so we generally recommend integration of the complete library instead.
var appboy = require('@braze/web-sdk-core');
appboy.initialize('YOUR-API-KEY', { baseUrl: 'YOUR-SDK-ENDPOINT' });
appboy.openSession();
See the Public Github Repo for getting started instructions or our documentation pages for use-case based documentation.
3.3.0
inAppMessageZIndex
initialization option that allows you to easily customize the z-index of In-App Messages displayed by the built-in UI.successCallback
and errorCallback
parameters to requestContentCardsRefresh
.brazeBridge
, which has the same API as appboyBridge
. appboyBridge
is now deprecated but will continue to function.appboy.logCustomEvent
and appboy.logPurchase
.appboyQueue
replay snippet from the npm
publication of the SDK. This avoids possible race conditions when referencing the SDK simultaneously from npm
and the CDN, and removes use of eval
from the npm
packageappboy.logCustomEvent
and appboy.logPurchase
now impose a 50KB limit on custom properties. If the supplied properties are too large, the event is not logged.trackLocation
method in favor of using the native Geolocation API and passing the location data to 'User.setLastKnownLocation`. See our public docs for more information.enableHtmlInAppMessages
initialization option in favor of allowUserSuppliedJavascript
. These options are functionally equivalent and no other changes are required.User.setCountry
.dismissed
property to TypeScript definition and docs for Card
subclasses.FAQs
Core Braze SDK (no UI) for web sites and other JS platforms.
The npm package @braze/web-sdk-core receives a total of 209 weekly downloads. As such, @braze/web-sdk-core popularity was classified as not popular.
We found that @braze/web-sdk-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.