Add category in eventOpts (#9164)

feature/default_network_editable
Thomas Huang 4 years ago committed by GitHub
parent 2e33b57d17
commit 3a7097a4cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/scripts/lib/background-metametrics.js

@ -2,12 +2,14 @@ import { getBackgroundMetaMetricState } from '../../../ui/app/selectors'
import { sendMetaMetricsEvent } from '../../../ui/app/helpers/utils/metametrics.util' import { sendMetaMetricsEvent } from '../../../ui/app/helpers/utils/metametrics.util'
export default function backgroundMetaMetricsEvent (metaMaskState, eventData) { export default function backgroundMetaMetricsEvent (metaMaskState, eventData) {
eventData.eventOpts['category'] = 'Background'
const stateEventData = getBackgroundMetaMetricState({ metamask: metaMaskState }) const stateEventData = getBackgroundMetaMetricState({ metamask: metaMaskState })
if (stateEventData.participateInMetaMetrics) { if (stateEventData.participateInMetaMetrics) {
sendMetaMetricsEvent({ sendMetaMetricsEvent({
...stateEventData, ...stateEventData,
...eventData, ...eventData,
category: 'Background',
currentPath: '/background', currentPath: '/background',
}) })
} }

Loading…
Cancel
Save