目录

Integrating the SDK

Integrating the SDK Using npm

  1. If the package.json file does not exist in the project, run the following command in the root directory of the project to create it:
    npm init
  2. Run the following command to install the SDK:
    npm install --save @hw-hmscore/analytics-web
    If you have run the pnpm command to install the SDK, also run the following command to install the AppGallery Connect dependency package:
    pnpm add @agconnect/api @agconnect/instance

Integrating the SDK Using UMD

  1. Download the SDK to be integrated using UMD. For details about the download link, please refer to Web SDK Download.
  2. Import the hw-hmscore-analytics-web-6.x.x-300.umd.js file in the downloaded SDK package to your project.

    In the file name, 6.x.x-300 indicates the version number of the referenced SDK, for example, 6.9.9-300.