Backend JS SDK
@userflux/backend-js
Getting Started
1. Install the package
npm i @userflux/backend-js2. Initialise the SDK
import UserFlux from '@userflux/backend-js';
// or
const UserFlux = require('@userflux/backend-js');
const ufClient = new UserFlux('<YOUR_WRITE_KEY>', {
autoEnrich: false,
defaultTrackingProperties: { ... }
});3. Tracking events
4. Identifying users
Other Methods Available
getUserIdFromCookie
getAnonymousIdFromCookie
getSessionIdFromCookie
isoTimestampToEpoch
Last updated