Integrate Javascript SDK

This document will cover Javascript SDK installation and initialization steps for your web application


Install SDK using npm / yarn

npm i @suprsend/web-sdk
yarn add @suprsend/web-sdk


Use SDK's init method to initialize the SuprSend SDK.

Once you initialize the sdk you can use all methods available in it. Make sure to initialize it before calling other methods of it. If you are using create-react-app, initialize it on top of App class in App.js.

import suprsend from "@suprsend/web-sdk";


Replace WORKSPACE KEY and WORKSPACE SECRET with your workspace values. You will get both the tokens from Suprsend dashboard (Settings page -> "API keys" section). For more details, check the documentation on 'Workspaces'.