DYN-9718: Add analytics to track MLTermsOfUse#16628
DYN-9718: Add analytics to track MLTermsOfUse#16628QilongTang merged 6 commits intoDynamoDS:masterfrom
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9718
There was a problem hiding this comment.
Pull Request Overview
This PR adds analytics tracking for the ML Terms of Use preference state at application shutdown. The change moves the tracking event from the property setter in PreferenceSettings.cs to DynamoModel.ShutDown(), capturing the final user preference state just before the analytics service is shut down. This approach avoids tracking each individual toggle of the preference and instead focuses on the final state to measure opt-out rates.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/DynamoCore/Models/DynamoModel.cs | Added analytics tracking call for ML Terms of Use status before analytics service shutdown |
| src/DynamoCore/Configuration/PreferenceSettings.cs | Removed analytics tracking from the IsMLAutocompleteTOUApproved property setter |
Co-authored-by: Copilot <[email protected]>
src/DynamoCore/Models/DynamoModel.cs
Outdated
|
|
||
| // Track ML Terms of Use status before shutting down the analytics service. | ||
| // This captures the final user preference state to measure opt-out rates. | ||
| Analytics.TrackPreference("MLTermsOfUse", "", PreferenceSettings.Instance?.IsMLAutocompleteTOUApproved == true ? 1 : 0); |
There was a problem hiding this comment.
Although this would work, but we have one existing pattern that we can follow - report this when initializing Dynamo, and the analytics client.
You can refer to https://github.com/DynamoDS/Dynamo/blob/master/src/DynamoCore/Logging/DynamoAnalyticsClient.cs#L179
There was a problem hiding this comment.
Hi @QilongTang thanks for your comments! I referred to the code you suggested and moved the analytics to when Dynamo and analytics client is initialized. 🙌
Co-authored-by: Copilot <[email protected]> (cherry picked from commit e86af97)
|
Successfully created backport PR for |
Purpose
IsMLAutocompleteTOUApprovedstatus during initiationPreferenceSettings.csto avoid tracking each individual selection eventDeclarations
Check these if you believe they are true
Release Notes
Add analytics to track MLTermsOfUse at shut down
Reviewers
@DynamoDS/eidos @DynamoDS/synapse
FYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of