Commit 70d1dce9 by 李嘉林

神策埋点

parent 37d55bc2
......@@ -29,6 +29,7 @@ module.exports = merge(prodEnv, {//zjgyl
AREA_JSON: '"https://mayi-newshop.oss-cn-shanghai.aliyuncs.com/static/js/app.area.json"',
WLY_PROD_MARKETING: '"https://uat-zanmall-m.cipmp.com"',
MANALYTICS_HOST: '"https://analytics.mayi888.cn/ma.gif"',
CLK_LOG_URL: '"https://clklog.mayi888.cn/clklog_receiver/api/gp"'
// IMG_DOMAIN: '"http://cdn.mayi888.com"',
})
......@@ -5754,9 +5754,9 @@
}
},
"mayi-front-tools": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.1.tgz",
"integrity": "sha512-xEkLnrY5VDU9ooonUwQyiKcOHuNhGq8MJ7dlNfM3QUlUWmZVxZj5r2Aa8yQI/ukfQdl1p5RUFjmIPfSZRQKMjQ=="
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/mayi-front-tools/-/mayi-front-tools-1.0.3.tgz",
"integrity": "sha512-tiMgJbyKBqbHbSApNC7zDok35ETRqu6tssyFwJZvIuwQWaJH8iiGJKOchXvDzjHm8yHiBKRb62FqqWaaG03/Kg=="
},
"md5.js": {
"version": "1.3.5",
......@@ -8639,6 +8639,11 @@
"resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz",
"integrity": "sha1-pfE/957zt0D+MKqAP7CfmIBdR4I="
},
"sa-sdk-miniprogram": {
"version": "1.20.2",
"resolved": "https://registry.npmjs.org/sa-sdk-miniprogram/-/sa-sdk-miniprogram-1.20.2.tgz",
"integrity": "sha512-0v0ngA0gzNLiUSK6pRjUyPWhj8u9F9+5sxo2C8y18MS9Mz73xpukRYXkKQMhHq924TQh54z8MRQ3uXVal4MOIg=="
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
......
......@@ -35,6 +35,7 @@
"mpvue-wxparse": "^0.6.5",
"posthog-js": "^1.39.1",
"posthog-node": "^2.2.3",
"sa-sdk-miniprogram": "^1.20.2",
"vuex": "^3.0.1",
"we-cropper": "^1.4.0",
"wxbarcode": "^1.0.2"
......
......@@ -49,6 +49,26 @@ mpAnalytics.init({
});
Vue.prototype.$mpAnalytics = mpAnalytics;
// 神策埋点
let sensors = require('../node_modules/sa-sdk-miniprogram/sensorsdata.min.js');
sensors.init({
name: 'mayi-minip',
server_url: process.env.CLK_LOG_URL,
// 全埋点控制开关
autoTrack:{
appLaunch: true, // 默认为 true,false 则关闭 $MPLaunch 事件采集
appShow: true, // 默认为 true,false 则关闭 $MPShow 事件采集
appHide: true, // 默认为 true,false 则关闭 $MPHide 事件采集
pageShow: true, // 默认为 true,false 则关闭 $MPViewScreen 事件采集
pageShare: true, // 默认为 true,false 则关闭 $MPShare 事件采集
mpClick: true, // 默认为 false,true 则开启 $MPClick 事件采集
mpFavorite: true, // 默认为 true,false 则关闭 $MPAddFavorites 事件采集
pageLeave: true // 默认为 false, true 则开启 $MPPageLeave事件采集
},
show_log: true
});
const app = new Vue(App)
app.$mount()
......
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