Click autocapture is off by default to keep package size and performance in check; launch, foreground/background, pages and sharing are still recorded automatically. If your framework cannot patch the global page object, wrap page definitions with the wrapper function instead of relying on automatic hooking.
Prerequisites
You can edit app.js and the platform's request-domain list.
Steps
Register the appid
Open ConsoleMini program analyticsConfigurationSDK code and add the appid from the mini program admin. A mismatch is rejected.
Allow the collector host
Add the collector hostname from the wizard to the mini program's request legal domain. Skipping domain checks in the devtools only affects local preview.
Install and init
Use the entry for that platform. See WeChat mini program, Alipay mini program, and Douyin mini program.
preInithooks app and page lifecycles. If consent is required, callinitonly after it.Preview once
Open the home page in the devtools or on a device.
Verify
Open ConsoleMini program analyticsRealtime. $mp_launch means the path works.
Common failures
The legal domain was not saved, the appid does not match, or init ran before consent. After saving the legal domain, rebuild; an old preview package still fails its requests. The on-device queue drops the oldest records past about 1 MB.
Next steps
Once you have an OpenID, link the login with Identify users. Exclude test devices on ConsoleMini program analyticsConfigurationMini-program settings; until you save exclusion and session rules there, the web rules apply.