mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-15 01:54:04 +08:00
fix(@angular/cli): add unique user id as user parameter in GA
While, GA collects the user id, this cannot be used for reporting and filtering purpose. This can be
This commit is contained in:
parent
c59c1e7e6d
commit
f41d609ae8
@ -38,6 +38,7 @@ PROJECT NAME TO BUILD OR A MODULE NAME.**
|
||||
<!--USER_DIMENSIONS_TABLE_BEGIN-->
|
||||
| Name | Parameter | Type |
|
||||
|:---:|:---|:---|
|
||||
| UserId | `up.ng_user_id` | `string` |
|
||||
| OsArchitecture | `up.ng_os_architecture` | `string` |
|
||||
| NodeVersion | `up.ng_node_version` | `string` |
|
||||
| NodeMajorVersion | `upn.ng_node_major_version` | `number` |
|
||||
|
@ -60,6 +60,8 @@ export class AnalyticsCollector {
|
||||
// While architecture is being collect by GA as UserAgentArchitecture.
|
||||
// It doesn't look like there is a way to query this. Therefore we collect this as a custom user dimension too.
|
||||
[UserCustomDimension.OsArchitecture]: os.arch(),
|
||||
// While User ID is being collected by GA, this is not visible in reports/for filtering.
|
||||
[UserCustomDimension.UserId]: userId,
|
||||
[UserCustomDimension.NodeVersion]: nodeVersion,
|
||||
[UserCustomDimension.NodeMajorVersion]: +nodeVersion.split('.', 1)[0],
|
||||
[UserCustomDimension.PackageManager]: context.packageManager.name,
|
||||
|
@ -48,6 +48,7 @@ export enum RequestParameter {
|
||||
* @see https://support.google.com/analytics/answer/10075209?hl=en
|
||||
*/
|
||||
export enum UserCustomDimension {
|
||||
UserId = 'up.ng_user_id',
|
||||
OsArchitecture = 'up.ng_os_architecture',
|
||||
NodeVersion = 'up.ng_node_version',
|
||||
NodeMajorVersion = 'upn.ng_node_major_version',
|
||||
|
Loading…
x
Reference in New Issue
Block a user