The console's platform list is longer than the published package. Baidu, Kuaishou, and QQ can appear as platform values, but @webcount/miniprogram has no entry file for them. Do not import a subpath that was never published.
Three entry points
| Platform | Entry | Stored platform |
|---|---|---|
@webcount/miniprogram/wx | mp_weixin | |
| Alipay | @webcount/miniprogram/my | mp_alipay |
| Douyin | @webcount/miniprogram/tt | mp_bytedance |
The webcount package name is the historical module id. The product name is TapCub. Install commands on the SDK code page match SDK overview. Alipay and Douyin use different global objects, but the init arguments (site key, endpoint, app id) match. Do not copy the WeChat import into the other two; switch the import path to the matching entry.
What is aligned
All three call preInit first (no network), then init when consent is not required or the user has already agreed. China mode must wait for consent before init. See Privacy choices before you start.
The scene code on launch and on return to the foreground is written to $scene, which the scenes report uses. Share callbacks are normalized to $share_distinct_id, so the return table does not split by each platform's raw parameter name. Click autocapture is off by default.
The three platforms share one script core: a local queue, retries, and remote config. Current Android and iOS builds do not read remote config. uni-app builds for these three platforms use this package. An H5 build should use the website script. See Cross-platform frameworks.
Setup notes
- The app id is that platform's mini program id. Register it on the SDK code page first, or the collect endpoint rejects the hit.
- The collect host must be a domain the mini program is allowed to request, or events never leave the device.
- Profile APIs follow each platform's current rules. The SDK does not bypass authorization to read an avatar or a phone number.
- A user id can be the open id after login. Anonymous visitors are still not written into the people directory.