0.1.0 • Published 11 months ago

@datarangers/sdk-javascript v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

English | 简体中文

DataRangers SDK - javascript

Sample

npm install 
npm run build

Sample

1. Initialize the SDK in your javascript file

const SDK = require('@datarangers/sdk-javascript');

SDK.init({
  app_id: 1234, // Replace it with the "APP_ID"
  channel: 'cn', // Replace it with your report channel
  log: true, // Whether to print the log
});

SDK.config({
  username: 'xxx', // when you want report username with event
});

SDK.start(); // Setup complete and now events can be sent.

2. Report custom user behavior events

// Take reporting the "video clicked" behavior of users for example
SDK.event('play_video', {
  title: 'Here is the video title',
});

3. Report the unique identifier of the currently logged in user

// Set "user_unique_id" after a user logs in and the user's unique identifier is retrieved.
 SDK.config({
    user_unique_id: 'zhangsan', // Unique user identifier
  });
0.1.0

11 months ago

0.0.7

1 year ago

0.0.5-lite

1 year ago

0.0.4-lite

1 year ago

0.0.6

1 year ago

0.0.4

2 years ago

0.0.3-lite

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

3 years ago