Skip to main content

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.

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.

Version Requirements

ItemRequirementDescription
Mini Program base library2.10.0+SDK initialization registers wx.onUnhandledRejection; runtimes below this version are not recommended
Recommended base library2.12.0+Enables complete page rendering, startup, script execution, and setData update timing collection
WeChat DevToolsRecent stable versionMust support npm dependency installation and Tools > Build npm
npm package@flashcatcloud/miniprogram-rumIncludes core functionality, platform adapter, and the RUM entry point
If your Mini Program allows users to run on base library versions below 2.10.0, SDK initialization may fail to register unhandled Promise rejection listeners. We recommend setting a minimum base library version in the Mini Program admin console, or evaluating low-version user coverage before integration.

Feature Compatibility

FeatureRequired capabilityMinimum base libraryBehavior on lower versions
Page lifecycle collectionGlobal Page wrapping, onLoad, onShow, onReady, onHide, onUnloadBasic capabilityLimited by Mini Program page lifecycle support
User action collectionPage event handler wrappingBasic capabilityLimited by page event support
Network request collectionwx.request, wx.uploadFile, wx.downloadFileBasic capabilityCannot automatically collect request types whose APIs are unavailable
Error collectionwx.onError, wx.onUnhandledRejection2.10.0+SDK is not recommended on lower versions
Network statuswx.getNetworkType, wx.onNetworkStatusChangeBasic capabilityUses the default connected state if network detection fails
Local cachewx.setStorageSync, wx.getStorageSync, wx.removeStorageSyncBasic capabilityUsed for session state and failed payload retry
Page performancewx.getPerformance2.11.0+Performance API metrics are skipped when unsupported
setData update timingPage instance setUpdatePerformanceListener2.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

PlatformSupport statusDescription
WeChat Mini Program✅ SupportedThe SDK is designed for the WeChat Mini Program runtime
WeChat Mini Game❌ Not supportedThe current SDK depends on Mini Program page lifecycle hooks and Page wrapping
Other Mini Program platforms❌ Not supportedAlipay, Baidu, ByteDance, QQ, and other Mini Program platform APIs are outside the current support scope
uni-app / Taro and other cross-platform frameworks⚠️ Verify firstIf 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:
  1. Run npm install @flashcatcloud/miniprogram-rum in the Mini Program project root
  2. Open the project in WeChat DevTools
  3. Run Tools > Build npm
  4. Confirm that the generated miniprogram_npm can be referenced by Mini Program code
When validating compatibility locally, select different debug base library versions in WeChat DevTools local settings, then verify initialization, automatic collection, and data reporting behavior.

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.