mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 10:30:04 +01:00
c557e25ba6
The background metrics were missing the `version` custom dimension. It has now been added to all background metric events.
18 lines
566 B
JavaScript
18 lines
566 B
JavaScript
import { getBackgroundMetaMetricState } from '../../../ui/app/selectors'
|
|
import { sendMetaMetricsEvent } from '../../../ui/app/helpers/utils/metametrics.util'
|
|
|
|
export default function backgroundMetaMetricsEvent (metaMaskState, version, eventData) {
|
|
|
|
eventData.eventOpts['category'] = 'Background'
|
|
|
|
const stateEventData = getBackgroundMetaMetricState({ metamask: metaMaskState })
|
|
if (stateEventData.participateInMetaMetrics) {
|
|
sendMetaMetricsEvent({
|
|
...stateEventData,
|
|
...eventData,
|
|
version,
|
|
currentPath: '/background',
|
|
})
|
|
}
|
|
}
|