0.1.2 • Published 2 years ago
buried_point_tool v0.1.2
buried_point_tool
Project setup
yarn install
Compiles and hot-reloads for development
yarn serve
Compiles and minifies for production
yarn build
Lints and fixes files
yarn lint
插件使用方法
安装 buried_point_tool
npm install buried_point_tool
全局引入
import buried from 'buried_point_tool'
Vue.use(buried)
页面使用
<input v-track="params"/>
export default {
data(){
return {
params:{
event_id: 'event_id111111',
action_id: 'action_id22222',
action_type: 'click',
// official_user_id、user_id、agentCode、openId、clientId(四个id优先级从高到低,传的值要对应)
user_type: 'clientId',
user_id: '12323121313131321312312',
// 当前页面信息,H5上传URL,小程序&APP上传路径
current_view_id: 'http://localhost:8080/#/HouseSecurity?sourcePlatform=ECEJ&advertising=ECEJ_SY'
}
}
}
}
暴露方法和指令
1、全局挂载指令 v-track="trackData"
2、暴露全局方法 this.$track(this.trackData);