0.6.0 • Published 5 years ago

@rrc/ashe v0.6.0

Weekly downloads
1
License
-
Repository
-
Last release
5 years ago

人人车 自建统计

通用人人车自建统计库 rls.js

Rls Usage

import Rls from './rls'
const rls = new Rls(options)

// 统计页面UV
rls.trackPageview(options)

// 事件统计
rls.push(options)

Use Vue

在 dom 中使用自定义指令 v-rc-log 在 js 中自定义发送统计使用 this.$rrcLog

main.js中

import rls from './rls'
import router from './router'
Vue.use(rls, {
  router,
  options: {
    rlsLogUrl
  }
})

demo.vue中

<button v-rc-log="rcLog" @click="onSay">say hello</button>
data () {
  return {
    rcLog: {
      event: '这里是事件名'
    }
  }
},
methods: {
  onSay() {
    this.$rrcLog.push({
      event: '我是自定义 js 发送'
    })
  }
}
0.6.0

5 years ago

0.5.0

5 years ago

0.4.0

5 years ago

0.3.0

6 years ago