
PV日志埋点参数包含应用开发管理平台appId、应用开发管理平台应用名称、经度、纬度和用户类型。
1、先根据ZWJSBridge.getLocation获取经纬度
ZWJSBridge.onReady(() => {
console.log("初始化完成后,执行bridge方法");
});
ZWJSBridge.getLocation().then((result) => {
console.log('获取经纬度', result);
this.latitudeStr = result.latitude;
this.longitudeStr = result.longitude;
}).catch((error) => {
console.log(error);
});
2、根据ZWJSBridge.getUserType获取用户类型
ZWJSBridge.getUserType().then((result) => {
console.log('用户类型', result);
if(result.userType==0 || result.userType==1){
this.userTypeStr='个人';
}else{
this.userTypeStr='企业';
}
}).catch((error) => {
console.log(error);
});
2、写入埋点
aplus_queue.push({
'action': 'aplus.sendPV',
'arguments': [{
is_auto: false
}, {
// 定义PV参数key-value键值对(只能是这种平铺的json,不能做多层嵌套), 如:
miniAppId: '应用开发管理平台appId',
miniAppName: '应用开发管理平台应用名称',
long: this.longitudeStr,
lati: this.latitudeStr,
userType: this.userTypeStr
}]
});
浙里办小程序window.open失效解决方法(ios系统)
上面是“浙里办获取PV日志参数埋点”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_1460.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

推荐一款免费的语音识别转文字在线工具——飞书妙记
网站为什么会被降权,网站被降权的原因是哪些?