mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
Add version
dimension to background metrics (#9167)
The background metrics were missing the `version` custom dimension. It has now been added to all background metric events.
This commit is contained in:
parent
1a5218ce8e
commit
4d499cc39e
@ -1,7 +1,7 @@
|
|||||||
import { getBackgroundMetaMetricState } from '../../../ui/app/selectors'
|
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, version, eventData) {
|
||||||
|
|
||||||
eventData.eventOpts['category'] = 'Background'
|
eventData.eventOpts['category'] = 'Background'
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ export default function backgroundMetaMetricsEvent (metaMaskState, eventData) {
|
|||||||
sendMetaMetricsEvent({
|
sendMetaMetricsEvent({
|
||||||
...stateEventData,
|
...stateEventData,
|
||||||
...eventData,
|
...eventData,
|
||||||
|
version,
|
||||||
currentPath: '/background',
|
currentPath: '/background',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1842,13 +1842,18 @@ export default class MetamaskController extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const metamaskState = await this.getState()
|
const metamaskState = await this.getState()
|
||||||
backgroundMetaMetricsEvent(metamaskState, {
|
const version = this.platform.getVersion()
|
||||||
customVariables,
|
backgroundMetaMetricsEvent(
|
||||||
eventOpts: {
|
metamaskState,
|
||||||
action,
|
version,
|
||||||
name,
|
{
|
||||||
|
customVariables,
|
||||||
|
eventOpts: {
|
||||||
|
action,
|
||||||
|
name,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
@ -115,6 +115,7 @@ function composeParamAddition (paramValue, paramName) {
|
|||||||
* @property {string} config.accountType The account type being used at the time of the event: 'hardware', 'imported' or 'default'
|
* @property {string} config.accountType The account type being used at the time of the event: 'hardware', 'imported' or 'default'
|
||||||
* @property {number} config.numberOfTokens The number of tokens that the user has added at the time of the event
|
* @property {number} config.numberOfTokens The number of tokens that the user has added at the time of the event
|
||||||
* @property {number} config.numberOfAccounts The number of accounts the user has added at the time of the event
|
* @property {number} config.numberOfAccounts The number of accounts the user has added at the time of the event
|
||||||
|
* @property {string} config.version The current version of the MetaMask extension
|
||||||
* @property {string} config.previousPath The pathname of the URL the user was on prior to the URL they are on at the time of the event
|
* @property {string} config.previousPath The pathname of the URL the user was on prior to the URL they are on at the time of the event
|
||||||
* @property {string} config.currentPath The pathname of the URL the user is on at the time of the event
|
* @property {string} config.currentPath The pathname of the URL the user is on at the time of the event
|
||||||
* @property {string} config.metaMetricsId A random id assigned to a user at the time of opting in to metametrics. A hexadecimal number
|
* @property {string} config.metaMetricsId A random id assigned to a user at the time of opting in to metametrics. A hexadecimal number
|
||||||
|
Loading…
Reference in New Issue
Block a user