All Products
Search
Document Center

Cloud Monitor:Integrate a minigame

Last Updated:Dec 03, 2025

Real User Monitoring (RUM) of Cloud Monitor 2.0 enables performance monitoring for minigames on platforms such as WeChat and TikTok. By integrating the node package manager (NPM) package, it captures performance metrics and detects runtime exceptions.

Procedure

  1. Log on to the Cloud Monitor 2.0 console, and select a workspace. In the left navigation pane, click Integration Center.

  2. In the Frontend Applications section, click the Minigame card, enter an application name, configure other parameters as needed, and click Create Application.

    Note

    The application name must be unique.

    After the application is created, the integration code appears at the bottom of the page. This code includes key information, such as the application ID and configuration address.

    You can later view the created application on the Application Center > RUM > Application List page. To view the integration code, go to the application details and navigate to the Application Settings > Basic Information page.

  3. Integrate the SDK.

    The minigame agent currently supports integration only through an NPM package.

    1. Import the NPM package.

      npm install @arms/rum-minigame
    2. Initialize the SDK.

      Note

      Replace pid and endpoint in the following code with the pid and endpoint generated in step 5.

      import armsRum from '@arms/rum-minigame';
      armsRum.init({
        pid: "your app id",
        endpoint: "your endpoint",//Example: https://aokcd*****-default-cn.rum.aliyuncs.com
      });
      
  4. Configure a secure domain name.

    Add the application endpoint to the domain name whitelist in the minigame management console.

Reference

The RUM SDK for minigames of Cloud Monitor 2.0 provides a wide variety of custom configurations to meet your business requirements.