0.1.2 • Published 7 years ago

sd-track-core v0.1.2

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

SD 统计封装

详见Git

安装使用

npm i sd-track-core@0.1.2 --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

0.1.2

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago