LiveLike Javascript SDK is an isomorphic package that could be used in any JS runtime environment allowing integrators to enhance user experiences with chat and other features to increase user engagement. JS runtime could be:
Web Browser (you could also use @livelike/engagementsdk instead)
Node.js (server side JS runtime technology)
Electron.js (client side technology to develop Desktop Application)
React Native (client side technology to develop native IOS and Android Mobile Application)
Installing
The Javascript SDK can be installed with npm or Yarn. For more details see the NPM package.
npm i @livelike/javascript
yarn add @livelike/javascript
Initialize the SDK with the LiveLike.init function. A Client ID is required to be passed as the clientId property of the function's object argument.
import { init } from "@livelike/javascript";
import { clientId } from './your-config'
init({ clientId }).then(profile => {
// This will generate a new profile
console.log("LiveLike is connected!")
});
Init Argument Details
clientId
Type
Default
String (Required)
No Default
accessToken
Type
Default
String
No Default
logger
Type
Default
boolean
false
nickName
Type
Default
String
If not provided, nickname will be randomly generated for the new profiles
Browse our API reference in case you need to understand API params return data types, API usages, object properties, etc.
🚧
User Profile Integration
The init function will create a new LiveLike profile and access token by default, and each profile created counts toward a monthly active user count. You should re-use the access tokens when you can to treat returning visitors as the same user. To better integrate this into your own product and more accurately reflect your MAUs, check out the User Profile Integration section.