1.0.2 • Published 1 year ago
harry-tracker v1.0.2
使用方法如下 The usage is as follows
<button target-key="btn">按钮监听</button>
<button>无添加</button>
<script>
import Tracker from 'harry-tracker'
const tr = new Tracker({
requestUrl:"http://localhost:9000/tracker",
historyTracker:true,
domTracker:true,
})
</script>
options 介绍 Options introduction
/**
* @requestUrl 接口地址
* @historyTracker history上报
* @hashTracker hash上报
* @domTracker 携带Tracker-key 点击事件上报
* @historyTracker sdkVersion sdk版本
* @historyTracker extra 透传字段
* @jsError js 和 promise 报错异常上报
*/
export interface DefaultOptons {
uuid: string | undefined,
requestUrl: string | undefined,
historyTracker: boolean,
hashTracker: boolean,
domTracker: boolean,
sdkVersion: string | number,
extra: Record<string, any> | undefined,
jsError:boolean
}