// 推荐:通过main.js模块化引入
import { EagleEye } from 'eagle-eye-track-sdk'
window.eagleEye = new EagleEye({
appKey: process.env.VUE_APP_TRACK_ID, // 传入网站标识,请通过系统创建
baseUrl: process.env.VUE_APP_TRACK_API // api部署路径
})
<!-- 在header中通过script标签引入 -->
<script async defer data-host-url="<%= process.env.VUE_APP_TRACK_API %>" data-website-id="<%= process.env.VUE_APP_TRACK_ID %>" src="./lib/js/tracker.js"></script>
interface EventSegments {
type?: string
tagName?: string
isTrusted?: boolean
x?: number
y?: number
view?: string
params?: object
}
interface ViewPayload {
appVersion?: string
ua?: string
screen?: string
devicePixelRatio?: number
language?: string
referrer?: string
hostname?: string
name?: string
visit?: number
url?: string
orientation?: 'landscape' | 'portrait'
view?: string
start?: number
}
interface UserPayload {
email?: string
phoneNumber?: string
staffCode?: string
staffName?: string
remark?: string
role?: string
deptmentId?: string
deptmentName?: string
deptmentSecId?: string
deptmentSecName?: string
deptmentThrId?: string
deptmentThrName?: string
gender?: string
positionId?: string
positionName?: string
staffType?: string
stat?: string
workplace?: string
signName?: string
}