目录

WeChat Mini-Program Sample Code

The sample code provides a demo project that demonstrates how to call open APIs of Analytics Kit. Guided by the demo, you will learn how to:

Sample Code

Find It on Gitee

Find It on GitHub

WeChat mini-program sample code

Click here

Click here

You can use the sample code only after completing the following operations:

  1. Start the IDE, go to miniprogram.hmsanalyticskitdemo, and run npm config set registry https://registry.npmjs.org to set the npm repository address.
  2. Run the npm install command to install the required dependencies.
  3. Go to Tools > Build npm to build the npm library file of the current project.
  4. Sign in to AppGallery Connect, and copy your mini-program configuration to replace the agconnectConfig configuration in the HiAnalyticsConfig.js file in the miniprogram.hmsanalyticskitdemo/utils directory of the demo project.