import MPTracker from './MPTracker';
MPTracker.track({
host: '<instance-domain>', // e.g. www.foo.com.cn,该 org 的域名
resourceId: '123456789987654321', // 创建的 Type 为 WeChat Mini Program 的 Trackable Resource ID
});
App({
onLaunch() {
// ...
},
});
追踪自定义事件
app.js 代码示例
import MPTracker from './MPTracker';
MPTracker.track({ host: '<instance-domain>', // e.g. www.foo.com.cn,该 org 的域名 resourceId: '123456789987654321', // 创建的 Type 为 WeChat Mini Program 的 Trackable Resource ID });