1.1.11 • Published 5 years ago

neky-report-zc v1.1.11

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

neky-report

web ubt report.

前端数据采集,UBT方案

    无痕埋点,
    用户行为监控,
    访客识别,
    api监控

安装//Install

npm install neky-report --save

ES6

import nekyReport from 'neky-report'

CommonJS

var nekyReport=  require('neky-report');

直接引用//Direct include

<script src="../node_modules/neky-report/src/index.js"></script>

使用方法//Usage

    let nekyRet = nekyEeport.init({ 
        url: 'http://localhost:3000/zc.gif', //采集地址,采用发送一张1x1的图片带上参数进行数据采集
        isClick: false, //是否全量点击,监听整个页面所有的点击事件
        uid: '', //采集用户的ID,默认为空
        clickAttr: {
            // dom: ['div'], 需要采集的DOM名称
            // className: ['aaa'], 需要采集的类目,需与DOM名称一起使用,采集某个DOM里有某个类目的DOM节点的数据
            noClassDom: ['a'], //无需类目的采集所有设定的DOM节点的数据
            attr: [{
                objKey: 'clickId', //设定返回数据的名称
                attrKey: 'data-src', //DOM节点需要采集的数据
                isUp: false, // 忘了是什么东西了
                tag: 'a div' //对应上面设定好的DOM
            },{
                objKey: 'href',
                attrKey: 'href',
                tag: 'a'
            },{
                objKey: 'clicksId',
                attrKey: 'data-url',
                tag: 'a'
            }],
            fun: function (data) {
                return data //点击事件返回上面设定好的数据,可进行改造后再上传给采集中心
            }
        }
    })

API

    nekyRet.watchApi(name,fun) //接收两个参数被监听的API的名称,以及监听成功后的回调函数。
    nekyRet.watchRead(fun) //忘了
    nekyRet.setData(data) //接收一个参数为需要同时上传给采集中心的数据。

License

MIT

1.1.11

5 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.22

6 years ago

1.0.21

6 years ago

1.0.20

6 years ago

1.0.19

6 years ago

1.0.18

6 years ago

1.0.17

6 years ago

1.0.16

6 years ago

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.0

6 years ago