-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
Copy pathgoogle-analytics.d.ts
107 lines (93 loc) · 3.09 KB
/
google-analytics.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* Describes data that will be tracked to Google Analytics
*/
interface IGoogleAnalyticsData {
/**
* Describes the type of information that will be tracked (Page or Event).
*/
googleAnalyticsDataType: GoogleAnalyticsDataType;
/**
* Describes all custom dimensions that will be send to analytics.
*/
customDimensions?: IStringDictionary;
}
/**
* Describes information about event that should be tracked.
*/
interface IEventActionData {
/**
* The action name.
*/
action: string;
/**
* Mobile platform for which the action will be tracked.
* In case device is passed, this property is disregarded and device.deviceInfo.platform is used instead.
*/
platform?: string;
/**
* Describes if the action is for device or for simulator/emulator.
* In case device is passed, this property is disregarded and !device.isEmulator is used instead.
*/
isForDevice?: boolean;
/**
* Device instance for which the action will be tracked.
*/
device?: Mobile.IDevice;
/**
* Any additional data that should be tracked.
*/
additionalData?: string;
/**
* Project directory, in case the action is executed inside project.
*/
projectDir?: string;
/**
* Value that should be tracked
*/
value?: number;
}
/**
* Describes page's information that should be tracked in Google Analytics.
* In CLI one page is one command.
*/
interface IGoogleAnalyticsPageviewData extends IGoogleAnalyticsData {
/**
* Document path. The path portion of the page URL.
* https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dp
* In our case this is the beautified command name, i.e. `build|android` will be tracked as `build android`, `build|*all` will be tracked as `build`.
*/
path: string;
/**
* The title of the page / document.
* https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dt
* In our case this is the beautified command name, i.e. `build|android` will be tracked as `build android`, `build|*all` will be tracked as `build`.
*/
title: string;
}
/**
* Describes event's information that should be tracked in Google Analytics.
* In CLI these are all custom metrics and data that we track, instead of command.
*/
interface IGoogleAnalyticsEventData extends IGoogleAnalyticsData {
/**
* Event category. For the moment it is hardcoded to CLI.
* https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ec
*/
category?: string;
/**
* Event action - the real action that has to be tracked, like Build, LiveSync, etc.
* https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ea
*/
action: string;
/**
* Event label - all custom data, specific for this action, like platform for Build operation, device type, os version, etc. for LiveSync.
* https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#el
*/
label: string;
/**
* Event value. Specifies the event value. Values must be non-negative.
* https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ev
* Currently not used.
*/
value?: number;
}