# hy-track **Repository Path**: sdmq/hy-track ## Basic Information - **Project Name**: hy-track - **Description**: 前端业务埋点系统 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2023-09-15 - **Last Updated**: 2023-09-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Bee Track

前端埋点SDK

[![NPM](https://img.shields.io/badge/npm-7.4.0-blue)](https://https://www.npmjs.com/) [![Code style](https://img.shields.io/badge/code%20style-prettier-ff69b4)](https://github.com/prettier/prettier) [![build status](https://img.shields.io/badge/build-passing-brightgreen)](https://img.shields.io/badge/build-passing-brightgreen) ### 功能 + ✅ `console`拦截 + ✅ 路由跳转拦截 + ✅ `http`请求拦截 + ✅ `click`全局拦截 + ✅ 单元测试`>70%`(待完善) + ✅ 浏览器`e2e`测试(待完善) ### `Web`端使用 ```bash $ yarn add @bee/track-web ``` 代码引入 ```javascript import { init } from '@bee/track-web' init({ reportUrl: 'http://localhost:9999/track/post-data', appKey: 'uuid-uuid', debug: true, user: 'xxxx', }); ``` ### 配置项 | 属性 | 类型 | 必填 | 描述 | | ---- | ---- | ---- | ---- | | appKey | string | 是 | appKey 项目唯一标识 | | reportUrl | string | 是 | 数据上报地址 | | debug | boolean | 否 | 是否打印调试信息 默认`false` | | disable | boolean | 否 | 是否禁用埋点 默认`false` | | user | boolean | 否 | 用户相关信息 默认空| |proxyEvent | string[]|否|代理的事件,可选`console`、`http`、`route`、`dom`, 默认不填就是所有| |httpWhiteList | string[]| 否|拦截http请求的白名单 默认空| |maxRecords|number|否|最大可储存的条数 - 暂时没用|