sd-track-event
安装使用
npm install sd-track-event --save
Vue.use(sdTrackEvent, {
biz: 'cf',
selfTag: storage.get('uuid')
authorizationV2: xxx
})
切换路由使用:
this.$sdTrackEvent.send({
op: 'page_enter',
fromPath: from.fullPath,
subChannel: '',
toPath: to.fullPath,
channel: to.query.channel,
testCode: to.query.grayMode,
extInfo: {
case_id: to.params.infoUuid || to.query.infoUuid
}
})
点击事件绑定:
<div v-sd-track="'ID'" data-test-flag="2" data-ext-info-test_test="test" .....></div>
Options
selfTag: '',// 用户唯一标识
biz: '',// 业务标识
authorizationV2: '',// 登录票
channel: '',// 渠道
elementCode: '',// 事件ID
testCode: '',// ABTEST标识
platform: 'wx',// 什么平台
subChannel: '',// 子渠道
fromPath: '',// 从哪来
toPath: '',// 到哪去
extInfo: ''// 自定义字段