0.1.38 • Published 7 years ago

sd-track-event v0.1.38

Weekly downloads
2
License
ISC
Repository
-
Last release
7 years ago

sd-track-event


安装使用

  npm install sd-track-event --save
  Vue.use(sdTrackEvent, {
    biz: 'cf', //cf, hz, sdb
    selfTag: storage.get('uuid')
    authorizationV2: xxx
  })

  切换路由使用:
  /*
    page_enter 页面访问事件
    click 单点击事件 用户单击某按钮或其他页面元素
    share 分享事件 分享动作发生时
    input 输入事件 用户在页面输入内容时
    api 接口调用事件
    swipe 滑动事件 手指在屏幕上滑动时会触发
    dialog 弹窗事件
    test 执行ABtest的操作打点
  */
  this.$sdTrackEvent.send({
    op: 'page_enter',
    fromPath: from.fullPath,
    subChannel: '',// 子渠道
    toPath: to.fullPath,
    pageName: to.name,// 页面名字
    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>

  新增方法:
  // 获取上家用户的加密userid
  this.$sdTrackEvent.getUserSourceId()

  // 获取上家的分享ID
  this.$sdTrackEvent.getShareId()

  // 获取自己本次分享的Id
  this.$sdTrackEvent.getSelfShareId()

  // 生成分享链接所需要的参数并返回 如:userSourceId, shareId
  url = this.$sdTrackEvent.setShareParams(url) // www.shuidichou.com/cf/launch?userSourceId=xxxx&shareId=xxxx

Options

  selfTag: '',// 用户唯一标识
  biz: '',// 业务标识
  authorizationV2: '',// 登录票
  channel: '',// 渠道
  elementCode: '',// 事件ID
  testCode: '',// ABTEST标识
  platform: 'wx',// 什么平台
  subChannel: '',// 子渠道
  fromPath: '',// 从哪来
  toPath: '',// 到哪去
  extInfo: ''// 自定义字段
0.1.38

7 years ago

0.1.37

7 years ago

0.1.36

7 years ago

0.1.35

7 years ago

0.1.34

7 years ago

0.1.33

8 years ago

0.1.32

8 years ago

0.1.31

8 years ago

0.1.30

8 years ago

0.1.29

8 years ago

0.1.28

8 years ago

0.1.27

8 years ago

0.1.26

8 years ago

0.1.25

8 years ago

0.1.24

8 years ago

0.1.23

8 years ago

0.1.22

8 years ago

0.1.21

8 years ago

0.1.20

8 years ago

0.1.19

8 years ago

0.1.18

8 years ago

0.1.17

8 years ago

0.1.16

8 years ago

0.1.15

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

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