2.14.0 • Published 8 months ago

@datarangers/sdk-mp v2.14.0

Weekly downloads
6
License
MIT
Repository
-
Last release
8 months ago

DataRangers SDK - mp

Sample

1. Initialize the SDK in app.js

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

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

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

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

App({
  onLaunch: function () {
    this.$$SDK = $$SDK; // Bind to the global app function to be called by other pages.

    //……
  },
});

2. Report custom user behavior events

// Take reporting the "video clicked" behavior of users for example
app.$$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(() => {
  app.$$SDK.config({
    user_unique_id: 'zhangsan', //Unique user identifier, can be "open_id".
  });
}, 1000);
2.14.0

8 months ago

2.13.0

11 months ago

2.12.1

1 year ago

2.12.2

1 year ago

2.12.0

1 year ago

2.11.0

2 years ago

2.10.3

2 years ago

2.10.2

2 years ago

2.10.1

2 years ago

2.10.0

2 years ago

2.9.1

2 years ago

2.9.0

2 years ago

2.8.3

2 years ago

2.8.1

2 years ago

2.8.0

3 years ago

2.8.2

2 years ago

2.7.0

3 years ago

2.6.0

3 years ago

2.5.4

3 years ago

2.7.1

3 years ago

2.5.5

3 years ago

2.5.2

3 years ago

2.5.3

3 years ago

1.13.2

3 years ago

1.13.3

3 years ago

2.5.0

3 years ago

2.5.1

3 years ago

1.13.1

3 years ago

1.13.0

3 years ago

1.12.1

3 years ago

1.12.0

3 years ago

2.3.0

3 years ago

2.4.1

3 years ago

2.4.0

3 years ago

2.3.1

3 years ago

2.2.0

3 years ago

1.11.1

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

1.11.0

3 years ago

2.1.0

3 years ago

1.10.2

3 years ago

2.0.0

4 years ago

1.9.1

4 years ago

1.10.1

4 years ago

1.10.0

4 years ago

1.9.0

4 years ago

1.8.2

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