The WeChat Mini Program RUM SDK runs in the WeChat Mini Program environment and collects data through lifecycle, network, storage, error listener, and performance APIs provided by the Mini Program base library. Before integration, confirm that your Mini Program’s minimum base library version and development tool configuration meet the following requirements.Documentation Index
Fetch the complete documentation index at: https://docs.flashcat.cloud/llms.txt
Use this file to discover all available pages before exploring further.
Version Requirements
| Item | Requirement | Description |
|---|---|---|
| Mini Program base library | 2.10.0+ | SDK initialization registers wx.onUnhandledRejection; runtimes below this version are not recommended |
| Recommended base library | 2.12.0+ | Enables complete page rendering, startup, script execution, and setData update timing collection |
| WeChat DevTools | Recent stable version | Must support npm dependency installation and Tools > Build npm |
| npm package | @flashcatcloud/miniprogram-rum | Includes core functionality, platform adapter, and the RUM entry point |
Feature Compatibility
| Feature | Required capability | Minimum base library | Behavior on lower versions |
|---|---|---|---|
| Page lifecycle collection | Global Page wrapping, onLoad, onShow, onReady, onHide, onUnload | Basic capability | Limited by Mini Program page lifecycle support |
| User action collection | Page event handler wrapping | Basic capability | Limited by page event support |
| Network request collection | wx.request, wx.uploadFile, wx.downloadFile | Basic capability | Cannot automatically collect request types whose APIs are unavailable |
| Error collection | wx.onError, wx.onUnhandledRejection | 2.10.0+ | SDK is not recommended on lower versions |
| Network status | wx.getNetworkType, wx.onNetworkStatusChange | Basic capability | Uses the default connected state if network detection fails |
| Local cache | wx.setStorageSync, wx.getStorageSync, wx.removeStorageSync | Basic capability | Used for session state and failed payload retry |
| Page performance | wx.getPerformance | 2.11.0+ | Performance API metrics are skipped when unsupported |
| setData update timing | Page instance setUpdatePerformanceListener | 2.12.0+ | The SDK checks whether the function exists and skips the metric when unsupported |
trackPerformance is enabled by default, but performance APIs are handled defensively in the SDK source code. If the base library does not support wx.getPerformance or the page instance does not support setUpdatePerformanceListener, basic page, action, request, and error events can still be collected.Supported Platforms
| Platform | Support status | Description |
|---|---|---|
| WeChat Mini Program | ✅ Supported | The SDK is designed for the WeChat Mini Program runtime |
| WeChat Mini Game | ❌ Not supported | The current SDK depends on Mini Program page lifecycle hooks and Page wrapping |
| Other Mini Program platforms | ❌ Not supported | Alipay, Baidu, ByteDance, QQ, and other Mini Program platform APIs are outside the current support scope |
| uni-app / Taro and other cross-platform frameworks | ⚠️ Verify first | If the final build runs as a WeChat Mini Program and preserves standard Page and wx.* APIs, validate integration in a test environment |
Development Tool and Build Requirements
When integrating through npm, build npm dependencies in WeChat DevTools:- Run
npm install @flashcatcloud/miniprogram-rumin the Mini Program project root - Open the project in WeChat DevTools
- Run Tools > Build npm
- Confirm that the generated
miniprogram_npmcan be referenced by Mini Program code
Related Pages
SDK Integration
Install and initialize the WeChat Mini Program RUM SDK.
Advanced Configuration
Configure proxying, tracing, sessions, and manual instrumentation.
Data Collection
Learn which page, action, request, error, and performance data the SDK collects automatically.