Parent issue: #150575
Consider
|
if (args.contains('--disable-analytics')) { |
|
// The tool sends the analytics event *before* toggling the flag |
|
// intentionally to be sure that opt-out events are sent correctly. |
|
AnalyticsConfigEvent(enabled: false).send(); |
and
|
// The tool sends the analytics event *before* toggling the flag |
|
// intentionally to be sure that opt-out events are sent correctly. |
|
AnalyticsConfigEvent(enabled: true).send(); |
.
Notice we send an AnalyticsConfigEvent (via package:usage), but no corresponding package:unified_analytics event. package:usage is deprecated and the backend for it has long-since been sunset. I assume we should have always been sending the corresponding Event.analyticsCollectionEnabled from package:unified_analytics. Either that, or this event was only ever important for usage-to-unified-analytics migration, and is no longer important.