diff options
Metametrics fixes (#6238)
* Improve opt-in opt-out event tracking after going 'back' in onboarding.
* Fix 'Switched Networks' metrics event.
* Fix custom variables ids (can only use ids 1-5)
* Fix tracking of function type custom variable for metametrics in confirm-transaction-base
* Add missing metametrics events
Diffstat (limited to 'ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js')
-rw-r--r-- | ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js b/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js index 834516f5f..58a03944e 100644 --- a/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js +++ b/ui/app/components/pages/first-time-flow/metametrics-opt-in/metametrics-opt-in.component.js @@ -98,21 +98,21 @@ export default class MetaMetricsOptIn extends Component { onCancel={() => { setParticipateInMetaMetrics(false) .then(() => { - if (participateInMetaMetrics === null) { - return metricsEvent({ + const promise = participateInMetaMetrics !== false + ? metricsEvent({ eventOpts: { category: 'Onboarding', action: 'Metrics Option', name: 'Metrics Opt Out', }, isOptIn: true, - }, { - excludeMetaMetricsId: true, }) - .then(() => { - history.push(nextRoute) - }) - } + : Promise.resolve() + + promise + .then(() => { + history.push(nextRoute) + }) }) }} cancelText={'No Thanks'} @@ -120,7 +120,7 @@ export default class MetaMetricsOptIn extends Component { onSubmit={() => { setParticipateInMetaMetrics(true) .then(([participateStatus, metaMetricsId]) => { - const promise = participateInMetaMetrics === null + const promise = participateInMetaMetrics !== true ? metricsEvent({ eventOpts: { category: 'Onboarding', |