-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
52 lines (49 loc) · 1.55 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
type Attributes = {[key: string]: any};
type PublicAttr = {
from?: string;
};
declare var BaiduMobStat: {
start: () => void;
setDebugOn: (flag: boolean) => void;
setUserId: (userId: string) => void;
/**
* @description 设置channelid
* https://mtj.baidu.com/static/userguide/book/android/adconfig/channel/channel.html
* @param appChannel 渠道值,数值自定义,不同渠道自己能区分即可,例如"baidu market"
* @param saveChannelWithCode 设置为true,保存设置(IOS 端无效)
*/
setAppChannel: (appChannel: string, saveChannelWithCode: boolean) => void;
/**
* @description 自定义用户属性
* @param property 开发者设置的自定义参数
*/
setUserProperty: (property: Attributes) => void;
setGlobalExtraInfo: (attr: Attributes) => void;
onEvent: (eventId: string, tag: string) => void;
onEventDuration: (
eventId: string,
eventTag: string,
duration: number,
) => void;
onEventStart: (eventId: string, tag: string) => void;
onEventEnd: (eventId: string, tag: string) => void;
onEventWithAttributes: (
eventId: string,
tag: string,
attr: Attributes & PublicAttr,
) => void;
onEventDurationWithAttributes: (
eventId: string,
tag: string,
duration: number,
attr: Attributes,
) => void;
onEventEndWithAttributes: (
eventId: string,
tag: string,
attr: Attributes,
) => void;
onPageStart: (pageName: string) => void;
onPageEnd: (pageName: string) => void;
};
export default BaiduMobStat;