
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,我们会在看到邮件的第一时间内为您处理!

3A游戏《黑神话:悟空》里有哪些头目?
GPT‑5.3 Instant模型使用入口,OpenAI推出专为优化日常聊天体验设计的轻量级对话模型
古登堡计划官网入口网址,拥有超75000本免费电子书的图书馆
帝国cms代码之做站常用的一些程序代码
Radar:涵盖关键词监控、趋势可视化等的社交媒体趋势分析高级工具
Z-Image:阿里通义6B参数轻量化多模态图像生成模型