1.0.2 • Published 2 years ago

cookie-maidian v1.0.2

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

tracker

这是一个埋点 SDK This is a buried SDK

使用方法如下 The usage is as follows

import Tracker from "cookie-maidian";

const tr = new Tracker({
  requestUrl: "xxxxxx",
});

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
  }