2.1.2 • Published 2 years ago

@datarangers/sdk-qg v2.1.2

Weekly downloads
4
License
-
Repository
-
Last release
2 years ago

DataRangers SDK - quickgame

Sample

1. Initialize the SDK in app.js

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

$$SDK.init({
  app_id: 1234, // Replace it with the "APP_ID"
  auto_report: true,
  log: true, // Whether to print the log
});

$$SDK.config({
  evtParams: {
    username: 'xxx',
  },
});

$$SDK.send(); // 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.
setTimeout(() => {
  $$SDK.config({
    user_unique_id: 'zhangsan', //Unique user identifier, can be "open_id".
  });
}, 1000);
2.1.2

2 years ago

2.1.1

3 years ago

2.1.0

3 years ago

1.11.0

3 years ago

2.0.1

3 years ago

2.0.0

4 years ago

1.10.0

4 years ago

1.9.0

4 years ago

1.8.0

4 years ago

1.7.1

4 years ago

1.7.0

4 years ago

1.6.0

4 years ago

1.5.2

4 years ago

1.5.1

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.15

4 years ago

1.3.14

4 years ago

1.3.13

5 years ago

1.3.12

5 years ago