userbased-js
v1.1.5
Published
## Install the SDK
Downloads
45
Readme
UserbasedJS
Install the SDK
with npm
npm i userbased-js --save
with yarn
yarn add userbased-js
Initialize the SDK
- Call the
init()
function with configuration options (api_key
,userbased_config
) as soon as you can in your application. Leave theuserbased_config
empty unless otherwise instructed. - Identify users after login by calling
identify(your-user-id)
as soon as possible. Without identifying users, the SDK will not start recording.
Initialization Examples
React
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import userbased from 'userbased-js';
userbased.init('your_api_key')
userbased.identify('your_user_id')
ReactDOM.render(<App />, document.getElementById('root'));