web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. seo教程
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站

浙里办获取PV日志参数埋点

1049 ℃
     

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系统)

浙里办调用ZWJSBridge方法须知

浙里办二次回退已解决,兼容支付宝小程序和浙里办app

浙里办项目中如何获取经纬度、城市区域、当前地址等相关信息

h5页面唤起打电话(纯h5、app嵌套、浙里办app)

标签: PV日志, 埋点, 浙里办

上面是“浙里办获取PV日志参数埋点”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_1460.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > 前端知识
本文共计876个字,预计阅读时长6分钟
生活小工具,收录了80多款小工具
上一篇: 推荐一个免费、无版权的古典音乐下载的网站——Musopen
下一篇: 推荐一款免费在线图片处理工具——佐糖图片平台
x 打工人ai神器