@braze/web-sdk-core
Version:
Core Braze SDK (no UI) for web sites and other JS platforms.
20 lines (13 loc) • 1.22 kB
Markdown
# Install
```shell
$ npm install --save /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.
# Usage
Note that this core version of the SDK does not contain any of Braze's built-in UI capabilities (any [appboy.display](https://js.appboycdn.com/web-sdk/latest/doc/module-display.html) 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](https://www.npmjs.com/package/@braze/web-sdk) instead.
```javascript
var appboy = require('/web-sdk-core');
appboy.initialize('YOUR-API-KEY', { baseUrl: 'YOUR-SDK-ENDPOINT' });
appboy.openSession();
```
See the [Public Github Repo](https://github.com/Appboy/appboy-web-sdk#readme) for getting started instructions or [our documentation pages](https://www.braze.com/docs/developer_guide/platform_integration_guides/web/initial_sdk_setup/) for use-case based documentation.