Add category in eventOpts (#9164)

feature/default_network_editable
Thomas Huang 4 years ago committed by Mark Stacey
parent 027723d396
commit 747f4bb5c3
  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'
export default function backgroundMetaMetricsEvent (metaMaskState, eventData) {
eventData.eventOpts['category'] = 'Background'
const stateEventData = getBackgroundMetaMetricState({ metamask: metaMaskState })
if (stateEventData.participateInMetaMetrics) {
sendMetaMetricsEvent({
...stateEventData,
...eventData,
category: 'Background',
currentPath: '/background',
})
}

Loading…
Cancel
Save