SDK Integration

Integration using Browsee's web client SDK.

To install Browsee web SDK just do:

$ npm i @browsee/web-sdk --save

Or, if you are using yarn

$ yarn add @browsee/web-sdk

Now you can import and start using the SDK. You need to initialize it with your project's API key. You can find your API key in settings or accounts page.

import browsee from '@browsee/web-sdk';
browsee.init({ apiKey: '<Your API Key>' });

Trying to use API calls before init will throw an error.

Examples

React

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import browsee from '@browsee/web-sdk';
import * as serviceWorker from './serviceWorker';
 
browsee.init({ apiKey: '<Your API Key>' });
 
ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

Next

For Next, this web-sdk is not the recommended installation method for Browsee. You can use next/script to directly add script tags.

Angular

Vue

API calls

Just like client-side API, you can use browsee object to send events, identify users or get session URL.

Sending custom events

Learn more about these APIs here.

Last updated

Was this helpful?