We should not have so many "Analytics Preference Selected" events, 1 and 2 seems to be an anonymous and a non-anonymous events (not sure of the order, 1 and 2 may be reverted).
But if we consider they are in the right order, in the following, event 2 is wrong and should not exist as the event was sent using trackEvent and not trackAnonymousEvent. See app/components/UI/OptinMetrics/index.js onConfirm()
1: this is an anonymous event (UUID Zero), properly not showing in user events
clarify and document the reason for this behaviour
fix and document it if necessary
Stakeholder review needed before the work gets merged
[X] Engineering (needed in most cases)
[ ] Design
[ ] Product
[ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
What is this about?
MetaMetrics
trackEvents
sends too many events in some cases.It's like it's doing both anonymous and non anonymous tracking at the same time, resulting in 3 events instead of 1.
Example:
Onboaring phase: when not checking marketing checkbox
We should not have so many "Analytics Preference Selected" events, 1 and 2 seems to be an anonymous and a non-anonymous events (not sure of the order, 1 and 2 may be reverted).
But if we consider they are in the right order, in the following, event 2 is wrong and should not exist as the event was sent using
trackEvent
and nottrackAnonymousEvent
. See app/components/UI/OptinMetrics/index.js onConfirm()1: this is an anonymous event (UUID Zero), properly not showing in user events
2: event with props, should be anonymous (UUID Zero) but it's not, showing up in user (see screenshot first event)
3: anonymous event (no props), see second event in screenshot
Scenario
No response
Design
No response
Technical Details
No response
Threat Modeling Framework
No response
Acceptance Criteria
Stakeholder review needed before the work gets merged
References
See @worldlyjohn comment on this PR https://github.com/MetaMask/metamask-mobile/pull/9905#issuecomment-2155321704