From 3cabe7525f7f7c65ce24a2080337a910de605fd4 Mon Sep 17 00:00:00 2001 From: Brad Decker Date: Mon, 14 Dec 2020 15:54:33 -0600 Subject: [PATCH] fix metametrics option tracking (#10071) --- .../metametrics-opt-in/metametrics-opt-in.component.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js index 2b34662ce..0bafcf01a 100644 --- a/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js +++ b/ui/app/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js @@ -105,7 +105,10 @@ export default class MetaMetricsOptIn extends Component { await setParticipateInMetaMetrics(false) try { - if (participateInMetaMetrics === true) { + if ( + participateInMetaMetrics === null || + participateInMetaMetrics === true + ) { await metricsEvent({ eventOpts: { category: 'Onboarding', @@ -128,7 +131,10 @@ export default class MetaMetricsOptIn extends Component { ) try { const metrics = [] - if (participateInMetaMetrics === false) { + if ( + participateInMetaMetrics === null || + participateInMetaMetrics === false + ) { metrics.push( metricsEvent({ eventOpts: {