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

1410 ℃

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://m.ipkd.cn/webs_1460.html

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

如何利用jQuery写一个倒计时
如何利用vuejs指令实现不同分辨率适配
mac电脑如何安装nodejs
jquery触发事件focus的运用
vuejs实现点击按钮复制文本内容clipboard