mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
Add category in eventOpts (#9164)
This commit is contained in:
parent
027723d396
commit
747f4bb5c3
@ -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…
Reference in New Issue
Block a user