@singcl/ad-execute-manager 1.5.1 → 1.5.2
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/LICENSE +21 -0
- package/dist/ad/AdAnalyticsJS.d.ts +8 -8
- package/dist/typings/tracker.d.ts +1 -115
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present, singcl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -17,7 +17,7 @@ export type ICommonInfo = {
|
|
|
17
17
|
[x: string]: any;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
* @template {Object.<string, object>}
|
|
20
|
+
* @template {Object.<string, object>} EventDict
|
|
21
21
|
*/
|
|
22
22
|
/**
|
|
23
23
|
* @typedef {object} IConstructorArgs
|
|
@@ -66,13 +66,13 @@ declare class AdAnalyticsJS {
|
|
|
66
66
|
* 追踪自定义事件
|
|
67
67
|
* 用户交互,如点击、提交
|
|
68
68
|
*
|
|
69
|
-
* @template {keyof
|
|
69
|
+
* @template {keyof EventDict} K
|
|
70
70
|
* @param {K} eventName - The name of the event to track.
|
|
71
|
-
* @param {
|
|
71
|
+
* @param {EventDict[K]} properties - The properties associated with the event.
|
|
72
72
|
* @param {object} [debugParams] - The debug parameters.
|
|
73
73
|
* @param {string} [debugParams.sign] - Whether to enable debug mode.
|
|
74
74
|
*/
|
|
75
|
-
track<K extends keyof
|
|
75
|
+
track<K extends keyof EventDict>(eventName: K, properties: EventDict[K], debugParams?: {
|
|
76
76
|
sign?: string;
|
|
77
77
|
}): void;
|
|
78
78
|
/**
|
|
@@ -112,15 +112,15 @@ declare class AdAnalyticsJS {
|
|
|
112
112
|
*
|
|
113
113
|
* @template {'cpage'} K
|
|
114
114
|
* @param {K} eventName - The name of the event to track.
|
|
115
|
-
* @param {
|
|
115
|
+
* @param {EventDict[K]} properties - The properties associated with the event.
|
|
116
116
|
*/
|
|
117
|
-
page<K extends "cpage">(eventName: K, properties:
|
|
117
|
+
page<K extends "cpage">(eventName: K, properties: EventDict[K]): void;
|
|
118
118
|
/**
|
|
119
119
|
*
|
|
120
|
-
* @param {
|
|
120
|
+
* @param {EventDict['cpage']} properties
|
|
121
121
|
* @returns
|
|
122
122
|
*/
|
|
123
|
-
cpage(properties:
|
|
123
|
+
cpage(properties: EventDict["cpage"]): void;
|
|
124
124
|
/**
|
|
125
125
|
* 站位方法,没有任何左右
|
|
126
126
|
* @returns
|
|
@@ -1,115 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* A dictionary mapping event names to their corresponding properties.
|
|
3
|
-
*/
|
|
4
|
-
export type EventDictionary = {
|
|
5
|
-
/**
|
|
6
|
-
* - 免费解锁弹窗
|
|
7
|
-
*/
|
|
8
|
-
free_unlock_popup: {
|
|
9
|
-
that: 0 | 1 | 2 | 3;
|
|
10
|
-
trigger_time: 0 | 1 | 2 | 3;
|
|
11
|
-
result: 0 | 1 | any;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* - 加载激励广告 加载激励广告时触发 - 无太大参考意义,可以忽略
|
|
15
|
-
*/
|
|
16
|
-
incentive_ad_load: {
|
|
17
|
-
scene: number;
|
|
18
|
-
result: string;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* 展示激励广告 激励广告展示时触发
|
|
22
|
-
*/
|
|
23
|
-
incentive_ad_show: {
|
|
24
|
-
scene: number;
|
|
25
|
-
result: string;
|
|
26
|
-
msg: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* 关闭激励广告 激励广告关闭时触发
|
|
30
|
-
*/
|
|
31
|
-
incentive_ad_close: {
|
|
32
|
-
scene: number;
|
|
33
|
-
ad_count: number;
|
|
34
|
-
ad_view_duration: string;
|
|
35
|
-
ad_is_completed: 0 | 1;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* 注册登录 触发时机 "打开小程序 进行注册/登录
|
|
39
|
-
*/
|
|
40
|
-
login: {
|
|
41
|
-
trigger_time: 1 | 2;
|
|
42
|
-
result: 0 | 1;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* 简介页交互 触发时机 点击简介页的按钮
|
|
46
|
-
*/
|
|
47
|
-
book_intro: {
|
|
48
|
-
trigger_time: 1 | 2 | 3 | 4;
|
|
49
|
-
book_title: 0 | 1;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* 进入小程序页面
|
|
53
|
-
*/
|
|
54
|
-
cpage: {
|
|
55
|
-
page: number;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* 点击书籍
|
|
59
|
-
*/
|
|
60
|
-
click_book: {
|
|
61
|
-
scene: number;
|
|
62
|
-
book_title: 0 | 1;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* 添加桌面图标
|
|
66
|
-
*/
|
|
67
|
-
add_shortcut: {
|
|
68
|
-
result: 0 | 1;
|
|
69
|
-
scene: number;
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* 小说章节展示 "1、用户首次展示新的章节(该章节如果未解锁,不上报;2s内只上报一次)2、用户解锁新的章节"
|
|
73
|
-
*/
|
|
74
|
-
chapter_show: {
|
|
75
|
-
book_title: 0 | 1;
|
|
76
|
-
chapter_number: number;
|
|
77
|
-
is_end: number;
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* 小说阅读开始
|
|
81
|
-
*/
|
|
82
|
-
speed_read_card: {
|
|
83
|
-
book_title: 0 | 1;
|
|
84
|
-
result: number;
|
|
85
|
-
trigger_time: number;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* 展示首页福利弹窗
|
|
89
|
-
*/
|
|
90
|
-
home_welfare_popup_show: {
|
|
91
|
-
trigger_time: 1 | 2;
|
|
92
|
-
result: 0 | 1;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* 关闭首页福利弹窗
|
|
96
|
-
*/
|
|
97
|
-
home_welfare_popup_close: {
|
|
98
|
-
trigger_way: 0 | 1 | 2;
|
|
99
|
-
result: 0 | 1;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* 展示免费领取弹窗
|
|
103
|
-
*/
|
|
104
|
-
free_popup_show: {
|
|
105
|
-
trigger_time: 1 | 2;
|
|
106
|
-
result: 0 | 1;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* 关闭免费领取弹窗
|
|
110
|
-
*/
|
|
111
|
-
free_popup_close: {
|
|
112
|
-
trigger_way: 0 | 1 | 2;
|
|
113
|
-
result: 0 | 1;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@singcl/ad-execute-manager",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"author": "singcl",
|
|
18
|
+
"license": "MIT",
|
|
18
19
|
"homepage": "https://npmjs.com/package/@singcl/ad-execute-manager",
|
|
19
20
|
"scripts": {
|
|
20
21
|
"build": "rslib build && tsc",
|