sd-track-core
v0.1.2
Published
sd 统计封装
Downloads
3
Readme
SD 统计封装
安装使用
npm i [email protected] --save
Demo
创建
import {Tracker} from 'sd-track-core'
const tracker = new Tracker({
showLog: true,
commonParams: () => {
return {
biz: 'SDH',
platform: '****',
}
},
commonControlArg: {},
// handleTrack: (trackData, controlArg) => {
// console.warn('统计怎么发可以重写,handleTrack: (trackData, controlArg) => {}')
// }
})
export default tracker
调用
tracker.track({
elementCode: 12345,
extInfo: {
id: 22,
name: 'extName'
}
})
扩展
更新日志
v0.1.2
npm ignore .babelrc
v0.1.1
rename tracker.wraper 2 tracker.wrapper
v0.1.0
修改api
v0.0.9
fix bug
Possible Unhandled Promise Rejection: TypeError: Cannot read property 'then' of undefined
v0.0.6
增加commonControlArg