Skip to content

fix(@angular-devkit/core): add Angular CLI major version as analytics dimension #22133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2022
Merged

fix(@angular-devkit/core): add Angular CLI major version as analytics dimension #22133

merged 1 commit into from
Mar 24, 2022

Conversation

alan-agius4
Copy link
Collaborator

With this change we replace the custom dimension 8 AOT Enabled, with Angular CLI Major Version. The motivation behind replacing this dimension is that the there is already an aot dimension with id 13 which serves for the same purpose.

More information to why we need a new dimension for the Angular CLI major version can be found #22130

Closes #22130

@google-cla google-cla bot added the cla: yes label Nov 10, 2021
@alan-agius4 alan-agius4 added the target: patch This PR is targeted for the next patch release label Nov 10, 2021
@alan-agius4 alan-agius4 marked this pull request as ready for review November 10, 2021 10:31
@alan-agius4 alan-agius4 changed the title fix(@angular-devkit/build-angular): add Angular CLI major version as analytics dimension fix(@angular-devkit/core): add Angular CLI major version as analytics dimension Nov 10, 2021
@alan-agius4 alan-agius4 added the merge: squash commits When the PR is merged, a squash and merge should be performed label Nov 10, 2021
@alan-agius4 alan-agius4 removed the merge: squash commits When the PR is merged, a squash and merge should be performed label Nov 10, 2021
@IgorMinar
Copy link
Contributor

Can we not reuse this dimension and instead create a new one or use browser version as suggested? The reason being that the dimension is already used for other purposes which then results in queries that span long time periods into the past to return garbage or unbelievable results. Thanks

@alan-agius4
Copy link
Collaborator Author

alan-agius4 commented Nov 10, 2021

@IgorMinar, so both dimension 8 and 13 are used in the reports to determine if a build is AOT or not?

We cannot add an additional dimension because we are already using the maximum allowed which is 20. With regards of using the Browser Version, this is currently used to track which OS is being used by building a fake UA string, I think in the past we found to be useful. Also this is not a custom dimension and I need to verify if GA API has some validations for this field. (Did try to look it up in the docs but got lost 😞)

PS: as a separate exercise we should probably visit some dimensions as I believe some of them don’t provide that much value.

@alan-agius4
Copy link
Collaborator Author

From the GA docs https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ua

The User Agent of the browser. Note that Google has libraries to identify real user agents. Hand crafting your own agent could break at any time.

@alan-agius4
Copy link
Collaborator Author

alan-agius4 commented Nov 10, 2021

@IgorMinar, maybe we can use aid (app Id) or aiid (app installer Id)? The latter is currently not used.

We also are tracking node.js version via aid and a custom dimension

this.parameters['aid'] = nodeVersion;

this._dimensions[analytics.NgCliAnalyticsDimensions.NodeVersion] = _getNumericNodeVersion();

@IgorMinar
Copy link
Contributor

@IgorMinar, maybe we can use aid (app Id) or aiid (app installer Id)? The latter is currently not used.

Maybe that would work, but @mgechev asked me about analytics 360 which would give us more dimensions. Let's explore if we can get on that plan and resolve this without hacks. We could use additional dimensions for future metrics anyway.

@alan-agius4
Copy link
Collaborator Author

alan-agius4 commented Nov 12, 2021

Yeah I brought that up with Minko, yesterday. That would allow us to have 200 dimensions and 200 metrics. On the free version we only 20.

Got this info from: https://support.google.com/analytics/answer/2709828?hl=en#Limits&zippy=%2Cin-this-article

@alan-agius4 alan-agius4 requested review from mgechev and removed request for IgorMinar March 15, 2022 15:33
… dimension

With this change we replace the custom dimension 8 `AOT Enabled`, with `Angular CLI Major Version`. The motivation behind replacing this dimension is that the there is already an `aot` dimension with id 13 which serves for the same purpose.

More information to why we need a new dimension for the Angular CLI major version can be found #22130

Closes #22130
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer hotlist: devRel and removed state: blocked labels Mar 15, 2022
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker action: review The PR is still awaiting reviews from at least one requested reviewer and removed cla: yes action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 22, 2022
@alan-agius4 alan-agius4 requested a review from clydin March 22, 2022 16:58
@alan-agius4 alan-agius4 removed the action: merge The PR is ready for merge by the caretaker label Mar 22, 2022
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Mar 22, 2022
@alan-agius4 alan-agius4 merged commit 455aeea into angular:master Mar 24, 2022
@alan-agius4 alan-agius4 deleted the custom-dem-cli branch March 24, 2022 07:53
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker hotlist: devRel target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telemetry collection: collect Angular major version as a separate dimension/metric
4 participants