@@ -4,7 +4,7 @@ This document list exactly what is gathered and how.
4
4
5
5
Any change to analytics should most probably include a change to this document.
6
6
7
- # Pageview
7
+ ## Pageview
8
8
9
9
Each command creates a pageview with the path ` /command/${commandName}/${subcommandName} ` . IE.
10
10
` ng generate component my-component --dryRun ` would create a page view with the path
@@ -16,7 +16,7 @@ Project names and target names will be removed.
16
16
The command ` ng run some-project:lint:some-configuration ` will create a page view with the path
17
17
` /command/run ` .
18
18
19
- # Dimensions
19
+ ## Dimensions and Metrics
20
20
21
21
Google Analytics Custom Dimensions are used to track system values and flag values. These
22
22
dimensions are aggregated automatically on the backend.
@@ -25,94 +25,83 @@ One dimension per flag, and although technically there can be an overlap between
25
25
simplicity it should remain unique across all CLI commands. The dimension is the value of the
26
26
` x-user-analytics ` field in the ` schema.json ` files.
27
27
28
- To create a new dimension (tracking a new flag):
29
-
30
- 1 . Create the dimension on analytics.google.com first. Dimensions are not tracked if they aren't
31
- defined on GA.
28
+ ### Adding dimension or metic.
29
+ 1 . Create the dimension or metric in (https://analytics.google.com/)[Google Analytics] first. These are not tracked if they aren't
30
+ defined in Google Analytics.
32
31
1 . Use the ID of the dimension as the ` x-user-analytics ` value in the ` schema.json ` file.
33
- 1 . Add a new row to the table below in the same PR as the one adding the dimension to the code.
34
- 1 . New dimension PRs need to be approved by the tooling and DevRel leads.
35
- ** This is not negotiable.**
32
+ 1 . New dimension and metrics PRs need to be approved by the tooling lead and require a new (http://go/launch)[Launch ] .
33
+
34
+ ### Deleting a dimension or metic.
35
+ 1 . Archive the dimension and metric in (https://analytics.google.com/)[Google Analytics] .
36
+
36
37
37
38
** DO NOT ADD ` x-user-analytics ` FOR VALUES THAT ARE USER IDENTIFIABLE (PII), FOR EXAMPLE A
38
39
PROJECT NAME TO BUILD OR A MODULE NAME.**
39
40
40
- Note: There's a limit of 20 custom dimensions.
41
+ ### Limits
42
+ | Item | Standard property limits |
43
+ | -------------------------------- | -------------------------- |
44
+ | Event-scoped custom dimensions | 50 |
45
+ | User-scoped custom dimensions | 25 |
46
+ | All custom metrics | 50 |
41
47
42
- ### List Of All Dimensions
48
+ ### List Of User Custom Dimensions
49
+
50
+ <!-- USER_DIMENSIONS_TABLE_BEGIN-->
51
+ | Name | Parameter | Type |
52
+ | :---:| :---| :---|
53
+ | Command | ` ep.ng_command ` | ` string ` |
54
+ | SchematicCollectionName | ` ep.ng_schematic_collection_name ` | ` string ` |
55
+ | SchematicName | ` ep.ng_schematic_name ` | ` string ` |
56
+ | Standalone | ` ep.ng_standalone ` | ` string ` |
57
+ | Style | ` ep.ng_style ` | ` string ` |
58
+ | Routing | ` ep.ng_routing ` | ` string ` |
59
+ | InlineTemplate | ` ep.ng_inline_template ` | ` string ` |
60
+ | InlineStyle | ` ep.ng_inline_style ` | ` string ` |
61
+ | BuilderTarget | ` ep.ng_builder_target ` | ` string ` |
62
+ | Aot | ` ep.ng_aot ` | ` string ` |
63
+ | Optimization | ` ep.ng_optimization ` | ` string ` |
64
+ <!-- USER_DIMENSIONS_TABLE_END-->
65
+
66
+ ### List Of Event Custom Dimensions
43
67
44
68
<!-- DIMENSIONS_TABLE_BEGIN-->
45
- | Id | Flag | Type |
69
+ | Name | Parameter | Type |
46
70
| :---:| :---| :---|
47
- | 1 | ` CPU Count ` | ` number ` |
48
- | 2 | ` CPU Speed ` | ` number ` |
49
- | 3 | ` RAM (In GB) ` | ` number ` |
50
- | 4 | ` Node Version ` | ` number ` |
51
- | 5 | ` Flag: --style ` | ` string ` |
52
- | 6 | ` --collection ` | ` string ` |
53
- | 7 | ` Flag: --strict ` | ` boolean ` |
54
- | 8 | ` Angular CLI Major Version ` | ` string ` |
55
- | 9 | ` Flag: --inline-style ` | ` boolean ` |
56
- | 10 | ` Flag: --inline-template ` | ` boolean ` |
57
- | 11 | ` Flag: --view-encapsulation ` | ` string ` |
58
- | 12 | ` Flag: --skip-tests ` | ` boolean ` |
59
- | 13 | ` Flag: --aot ` | ` boolean ` |
60
- | 14 | ` Flag: --minimal ` | ` boolean ` |
61
- | 15 | ` Flag: --standalone ` | ` boolean ` |
62
- | 16 | ` Flag: --optimization ` | ` boolean ` |
63
- | 17 | ` Flag: --routing ` | ` boolean ` |
64
- | 18 | ` Flag: --skip-import ` | ` boolean ` |
65
- | 19 | ` Flag: --export ` | ` boolean ` |
66
- | 20 | ` Build Errors (comma separated) ` | ` string ` |
71
+ | Command | ` ep.ng_command ` | ` string ` |
72
+ | SchematicCollectionName | ` ep.ng_schematic_collection_name ` | ` string ` |
73
+ | SchematicName | ` ep.ng_schematic_name ` | ` string ` |
74
+ | Standalone | ` ep.ng_standalone ` | ` string ` |
75
+ | Style | ` ep.ng_style ` | ` string ` |
76
+ | Routing | ` ep.ng_routing ` | ` string ` |
77
+ | InlineTemplate | ` ep.ng_inline_template ` | ` string ` |
78
+ | InlineStyle | ` ep.ng_inline_style ` | ` string ` |
79
+ | BuilderTarget | ` ep.ng_builder_target ` | ` string ` |
80
+ | Aot | ` ep.ng_aot ` | ` string ` |
81
+ | Optimization | ` ep.ng_optimization ` | ` string ` |
67
82
<!-- DIMENSIONS_TABLE_END-->
68
83
69
- # Metrics
70
-
71
- ### List of All Metrics
84
+ ### List Of Event Custom Metrics
72
85
73
86
<!-- METRICS_TABLE_BEGIN-->
74
- | Id | Flag | Type |
87
+ | Name | Parameter | Type |
75
88
| :---:| :---| :---|
76
- | 1 | ` NgComponentCount ` | ` number ` |
77
- | 2 | ` UNUSED_2 ` | ` none ` |
78
- | 3 | ` UNUSED_3 ` | ` none ` |
79
- | 4 | ` UNUSED_4 ` | ` none ` |
80
- | 5 | ` Build Time ` | ` number ` |
81
- | 6 | ` NgOnInit Count ` | ` number ` |
82
- | 7 | ` Initial Chunk Size ` | ` number ` |
83
- | 8 | ` Total Chunk Count ` | ` number ` |
84
- | 9 | ` Total Chunk Size ` | ` number ` |
85
- | 10 | ` Lazy Chunk Count ` | ` number ` |
86
- | 11 | ` Lazy Chunk Size ` | ` number ` |
87
- | 12 | ` Asset Count ` | ` number ` |
88
- | 13 | ` Asset Size ` | ` number ` |
89
- | 14 | ` Polyfill Size ` | ` number ` |
90
- | 15 | ` Css Size ` | ` number ` |
89
+ | AllChunksCount | ` epn.ng_all_chunks_count ` | ` number ` |
90
+ | LazyChunksCount | ` epn.ng_lazy_chunks_count ` | ` number ` |
91
+ | InitialChunksCount | ` epn.ng_initial_chunks_count ` | ` number ` |
92
+ | ChangedChunksCount | ` epn.ng_changed_chunks_count ` | ` number ` |
93
+ | DurationInMs | ` epn.ng_duration_ms ` | ` number ` |
91
94
<!-- METRICS_TABLE_END-->
92
95
93
- # Operating System and Node Version
94
-
95
- A User Agent string is built to "fool" Google Analytics into reading the Operating System and
96
- version fields from it. The base dimensions are used for those.
97
-
98
- Node version is our App ID, but a dimension is also used to get the numeric MAJOR.MINOR of node.
99
-
100
- # Debugging
101
-
102
- Using ` DEBUG=ng:analytics ` will report additional information regarding initialization and
103
- decisions made during the usage analytics process, e.g. if the user has analytics disabled.
104
-
105
- Using ` DEBUG=ng:analytics:command ` will show the decisions made by the command runner.
106
-
107
- Using ` DEBUG=ng:analytics:log ` will show what we actually send to GA.
96
+ ## Debugging
108
97
109
- See [ the ` debug ` NPM library ] ( https://www.npmjs.com/package/ debug) for more information .
98
+ Using ` NG_DEBUG=1 ` will enable Google Analytics debug mode, To view the debug events, in Google Analytics go to ` Configure > DebugView ` .
110
99
111
- # Disabling Usage Analytics
100
+ ## Disabling Usage Analytics
112
101
113
102
There are 2 ways of disabling usage analytics:
114
103
115
- 1 . using ` ng analytics off --global ` (or changing the global configuration file yourself). This is the same
104
+ 1 . using ` ng analytics disable --global ` (or changing the global configuration file yourself). This is the same
116
105
as answering "No" to the prompt.
117
106
1 . There is an ` NG_CLI_ANALYTICS ` environment variable that overrides the global configuration.
118
107
That flag is a string that represents the User ID. If the string ` "false" ` is used it will
0 commit comments