5 lines
4.2 KiB
JSON
5 lines
4.2 KiB
JSON
|
{
|
||
|
"id": "cli/usage-analytics-gathering",
|
||
|
"title": "Gathering and Viewing Usage Analytics",
|
||
|
"contents": "\n\n\n<div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/aio/content/cli/usage-analytics-gathering.md?message=docs%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n</div>\n\n\n<div class=\"content\">\n <h1 id=\"gathering-and-viewing-usage-analytics\">Gathering and Viewing Usage Analytics<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"cli/usage-analytics-gathering#gathering-and-viewing-usage-analytics\"><i class=\"material-icons\">link</i></a></h1>\n<p>Users can opt in to share their Angular CLI usage data with <a href=\"https://support.google.com/analytics/answer/1008015?hl=en\">Google Analytics</a>, using the <a href=\"analytics\"><code>ng analytics</code> CLI command</a>.\nThe data is also shared with the Angular team, and used to improve the CLI.</p>\n<p>The gathering of CLI analytics data is disabled by default, and must be enabled at the project level by individual users.\nIt cannot be enabled at the project level for all users.</p>\n<p>Data gathered in this way can be viewed on the Google Analytics site, but is not automatically visible on your own organization's Analytics site.\nAs an administrator for an Angular development group, you can configure your instance of Angular CLI to be able to see analytics data for your own team's usage of the Angular CLI.\nThis configuration option is separate from and in addition to other usage analytics that your users may be sharing with Google.</p>\n<h2 id=\"enable-access-to-cli-usage-data\">Enable access to CLI usage data<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"cli/usage-analytics-gathering#enable-access-to-cli-usage-data\"><i class=\"material-icons\">link</i></a></h2>\n<p>To configure access to your own users' CLI usage data, use the <code>ng config</code> command to add a key to your global <a href=\"guide/workspace-config\"><code>angular.json</code> workspace configuration file</a>.\nThe key goes under <code>cli.analyticsSharing</code> at the top level of the file, outside the <code>projects</code> sections.\nThe value of the key is your organization's tracking ID, as assigned by Google Analytics.\nThis ID is a string that looks like <code>UA-123456-12</code>.</p>\n<p>You can choose to use a descriptive string as the key value, or be assigned a random key when you run the CLI command.\nFor example, the following command adds a configuration key named \"tracking\".</p>\n<code-example language=\"sh\" class=\"code-shell\">\nng config --global cli.analyticsSharing.tracking UA-123456-12\n</code-example>\n<p>To turn off this feature, run the following command:</p>\n<code-example language=\"sh\" class=\"code-shell\">\nng config --global --remove cli.analyticsSharing\n</code-example>\n<h2 id=\"per-user-tracking\">Per user tracking<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"cli/usage-analytics-gathering#per-user-tracking\"><i class=\"material-icons\">link</i></a></h2>\n<p>You can add a custom user ID to the global configuration, in order to identify unique usage of commands and flags.\nIf that user enables CLI analytics for their own project, your analytics display tracks and labels their individual usage.</p>\n<code-example language=\"sh\" class=\"code-shell\">\nng config --global cli.analyticsSharing.user SOME_USER_NAME\n</code-example>\n<p>To generate a new random user ID, run the following command:</p>\n<code-example language=\"sh\" class=\"code-shell\">\nng config --global cli.analyticsSharing.user \"\"\n</code-example>\n\n \n</div>\n\n<!-- links to this doc:\n-->\n<!-- links from this doc:\n - analytics\n - cli/usage-analytics-gathering#enable-access-to-cli-usage-data\n - cli/usage-analytics-gathering#gathering-and-viewing-usage-analytics\n - cli/usage-analytics-gathering#per-user-tracking\n - guide/workspace-config\n - https://github.com/angular/angular/edit/master/aio/content/cli/usag
|
||
|
}
|