Commit 4d2d1822 authored by Damon's avatar Damon

refactor: 去除埋点

parent 4842f56a
<script>
import "./../.env.js";
import { AnalysysAgent } from "@/utils/analysys_paas.js";
import util from "@/utils/util.js";
import login from "@/utils/login.js";
import upload from '@/components/upload/task.js'
import { ERROR } from "@/common/log.js"
export default {
globalData: {
......@@ -70,7 +68,7 @@ export default {
},
onLaunch: async function () {
// 应用初始化(全局只触发一次)
AnalysysAgent.registerSuperProperty("platform", "self-support");
// AnalysysAgent.registerSuperProperty("platform", "self-support");
// 版本更新
await this.updateApp();
this.getSystemInfo();
......@@ -85,9 +83,6 @@ export default {
},
onHide: function () {
// 应用从前台进入后台
// if (this.uploadTask.length > 0) {
// ERROR('onUnload', {task: this.uploadTask.length, mobile: this.vuex_user.mobile})
// }
},
watch: {
uploadTask: function(newValue, oldValue) {
......@@ -217,59 +212,59 @@ export default {
track(event, properties) {
if (AnalysysAgent) {
// 易观添加事件
let AnalysysAgent = wx.AnalysysAgent;
AnalysysAgent.track("self_support_" + event, properties);
// let AnalysysAgent = wx.AnalysysAgent;
// AnalysysAgent.track("self_support_" + event, properties);
}
},
profileSet(vm) {
// 设备身份标识
if (AnalysysAgent) {
let user = vm.$u.deepClone(vm.vuex_user);
let profile = vm.$u.deepClone(vm.vuex_auth_user);
profile.openid = user.wxopenid || profile.openid
profile.unionid = user.unionid || profile.unionid || null
AnalysysAgent.profileSet(profile);
// let user = vm.$u.deepClone(vm.vuex_user);
// let profile = vm.$u.deepClone(vm.vuex_auth_user);
// profile.openid = user.wxopenid || profile.openid
// profile.unionid = user.unionid || profile.unionid || null
// AnalysysAgent.profileSet(profile);
}
},
profileAppend(vm) {
if (AnalysysAgent) {
let user = vm.$u.deepClone(vm.vuex_user);
// 用户id设置
AnalysysAgent.alias(user.id + "");
// 用户附加属性
let profile = {
userfrom: "自营平台",
id: user.id,
mobile: user.mobile,
loginName: user.loginName,
source: user.score,
};
Object.keys(profile).map((key) => {
if (key && profile[key]) {
AnalysysAgent.profileAppend(key, profile[key]);
}
});
// let user = vm.$u.deepClone(vm.vuex_user);
// // 用户id设置
// AnalysysAgent.alias(user.id + "");
// // 用户附加属性
// let profile = {
// userfrom: "自营平台",
// id: user.id,
// mobile: user.mobile,
// loginName: user.loginName,
// source: user.score,
// };
// Object.keys(profile).map((key) => {
// if (key && profile[key]) {
// AnalysysAgent.profileAppend(key, profile[key]);
// }
// });
}
},
share(toShareProperties, trackProperties) {
if (AnalysysAgent) {
AnalysysAgent.share(toShareProperties, trackProperties);
// AnalysysAgent.share(toShareProperties, trackProperties);
}
},
trackPage(pageName, properties) {
if (AnalysysAgent) {
AnalysysAgent.pageView(pageName, properties);
// AnalysysAgent.pageView(pageName, properties);
}
},
initShare(option) {
option = option || {};
if (AnalysysAgent && option.user_id) {
let shareUserInfo = {
share_from_id: option.user_id || "",
share_from_nickname: option.user_name || "",
};
AnalysysAgent.registerSuperProperties(shareUserInfo);
}
// option = option || {};
// if (AnalysysAgent && option.user_id) {
// let shareUserInfo = {
// share_from_id: option.user_id || "",
// share_from_nickname: option.user_name || "",
// };
// AnalysysAgent.registerSuperProperties(shareUserInfo);
// }
},
/* ------------------------- 数据埋点end ------------------------------ */
},
......
......@@ -3,16 +3,16 @@ import {
} from '@/config';
// #ifdef MP-WEIXIN
import AnalysysAgent from '@/include/libs/analysys_paas/mp-weixin/AnalysysAgent_WX_SDK.custom.es6.min.js'
if (AnalysysAgent) {
AnalysysAgent.identify(AnalysysAgent.getDistinctId());
AnalysysAgent.appkey = argo.appkey //设置您的APPKEY
AnalysysAgent.debugMode = argo.debugMode
AnalysysAgent.uploadURL = argo.uploadURL;
// AnalysysAgent.autoShare = true
AnalysysAgent.allowTimeCheck = true
AnalysysAgent.autoTrack = true
AnalysysAgent.registerSuperProperty("platform","self-support");
}
// if (AnalysysAgent) {
// AnalysysAgent.identify(AnalysysAgent.getDistinctId());
// AnalysysAgent.appkey = argo.appkey //设置您的APPKEY
// AnalysysAgent.debugMode = argo.debugMode
// AnalysysAgent.uploadURL = argo.uploadURL;
// // AnalysysAgent.autoShare = true
// AnalysysAgent.allowTimeCheck = true
// AnalysysAgent.autoTrack = true
// AnalysysAgent.registerSuperProperty("platform","self-support");
// }
// #endif
export {
AnalysysAgent,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment