monitor-track 1.11.0 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +15 -5
- package/cjs/handlers/pv.d.ts +1 -0
- package/cjs/index.d.ts +4 -0
- package/cjs/index.js +1102 -1060
- package/cjs/reporter.d.ts +18 -7
- package/cjs/types/global.d.ts +16 -2
- package/cjs/types/index.d.ts +10 -5
- package/esm/config/global.js +15 -5
- package/esm/handlers/error.js +3 -3
- package/esm/handlers/pv.d.ts +1 -0
- package/esm/handlers/pv.js +17 -7
- package/esm/handlers/user-activity.js +2 -2
- package/esm/index.d.ts +4 -0
- package/esm/index.js +20 -4
- package/esm/package.json.js +1 -1
- package/esm/reporter.d.ts +18 -7
- package/esm/reporter.js +20 -10
- package/esm/types/global.d.ts +16 -2
- package/esm/types/index.d.ts +10 -5
- package/esm/utils/index.js +8 -12
- package/index.js +1454 -1410
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,42 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.12.0 (2026-05-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
* 修复数据查询错误 ([fd60648](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/fd60648607a122a6147d2e37171b98c52185eeb1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### ✨ Features
|
|
15
|
+
|
|
16
|
+
* lag相关 ([c2e4054](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/c2e405499a500e046d3b8b1ff770d66df6d5c8a5))
|
|
17
|
+
* 升级eslint9 ([279c252](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/279c2526626aec9ae79d41e595041f69fce5ae44))
|
|
18
|
+
* 新增lag和api页面的详情页 ([c8c7163](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/c8c7163eb2a45edc9762f4e03f6a3fff2f9c932f))
|
|
19
|
+
* 新增检测web页面卡顿 ([fad84b1](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/fad84b1813beaba778e30330dff133e86d432c1b))
|
|
20
|
+
* 更新lock文件 ([348911b](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/348911bef37a478ed0c60470bdb4cd9159a8ce7e))
|
|
21
|
+
* 预留上报请求参数和请求方法字段 ([0123172](https://gitlab.seazonmotor.com/panda/CSD_UserBehaviorTracking/commit/0123172677749328a51f3a9a0db6630b4d9a531d))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 1.11.0 (2024-10-21)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### 🐛 Bug Fixes
|
|
29
|
+
|
|
30
|
+
* 修复eslint检查 ([0bddc71](https://github.com/zhoushoujian/monitor/commit/0bddc711d14663340bebad23f1878daff22385c2))
|
|
31
|
+
* import order ([2b81892](https://github.com/zhoushoujian/monitor/commit/2b81892e974a828895e7c003e19b8fe0499c2a6b))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### ✨ Features
|
|
35
|
+
|
|
36
|
+
* 5.0.0版本 ([27ed114](https://github.com/zhoushoujian/monitor/commit/27ed11412fe393bde0822cd18ab2ac13c222ea1e))
|
|
37
|
+
* 更新一些依赖 ([3593eac](https://github.com/zhoushoujian/monitor/commit/3593eac70450fbb2d4bf9c745dbc10c09d5d9ca7))
|
|
38
|
+
* monitor ([c4da59b](https://github.com/zhoushoujian/monitor/commit/c4da59bfc6e4ffe38670cb0f3c0f9f76cdecf99a))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
6
42
|
### 1.10.2 (2023-08-25)
|
|
7
43
|
|
|
8
44
|
|
package/README.md
CHANGED
|
@@ -14,13 +14,23 @@ import Track from 'monitor-track';
|
|
|
14
14
|
const track = new Track();
|
|
15
15
|
|
|
16
16
|
track.init({
|
|
17
|
-
// 由监控平台后台管理系统创建项目时生成
|
|
18
|
-
|
|
19
|
-
reportUrl: 'http://localhost:3008/report',
|
|
17
|
+
projectID: 'IuggBOP==', // 由监控平台后台管理系统创建项目时生成
|
|
18
|
+
reportUrl: 'https://api-track.zhoushoujian.com/monitor-service/s/r', //上报地址
|
|
20
19
|
spa: true,
|
|
21
|
-
// 不是hash模式的项目一定要改成false,否则不能统计到pv的类型
|
|
22
|
-
|
|
20
|
+
hash: true, // 不是hash模式的项目一定要改成false,否则不能统计到pv的类型
|
|
21
|
+
enable: true,
|
|
22
|
+
customPayload,
|
|
23
|
+
ignore: {
|
|
24
|
+
errors: [
|
|
25
|
+
'ResizeObserver loop limit exceeded',
|
|
26
|
+
'ResizeObserver loop completed with undelivered notifications.',
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
|
|
23
30
|
});
|
|
31
|
+
|
|
32
|
+
// 注意:sdk默认取localStorage.getItem('username')作为uuid,所以如果要将用户名作为用户标识,请将username存到localStorage中
|
|
33
|
+
// 如果localStorage.getItem('username')取不到值,则会使用uuid作为用户标识,这时用户标识是匿名的,有可能会出现一个用户统计为两个或多个用户的情况
|
|
24
34
|
```
|
|
25
35
|
|
|
26
36
|
## 配置项
|
package/cjs/handlers/pv.d.ts
CHANGED
package/cjs/index.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { IConfig } from './types/config';
|
|
2
3
|
export default class Track {
|
|
4
|
+
lagTimer: NodeJS.Timeout | null;
|
|
5
|
+
observer: PerformanceObserver | null;
|
|
3
6
|
init(config: IConfig): void;
|
|
4
7
|
visualTrack: () => void;
|
|
8
|
+
listenPageLag: () => void;
|
|
5
9
|
/**
|
|
6
10
|
* @description 监听错误异常
|
|
7
11
|
*/
|