mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add metrics events for Wyre and CoinSwitch (#8677)
This commit is contained in:
parent
f8137b7a66
commit
93c2184bd9
@ -6,6 +6,7 @@ import Button from '../../../ui/button'
|
|||||||
export default class DepositEtherModal extends Component {
|
export default class DepositEtherModal extends Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
t: PropTypes.func,
|
t: PropTypes.func,
|
||||||
|
metricsEvent: PropTypes.func.isRequired,
|
||||||
}
|
}
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@ -141,7 +142,16 @@ export default class DepositEtherModal extends Component {
|
|||||||
title: this.context.t('buyWithWyre'),
|
title: this.context.t('buyWithWyre'),
|
||||||
text: this.context.t('buyWithWyreDescription'),
|
text: this.context.t('buyWithWyreDescription'),
|
||||||
buttonLabel: this.context.t('continueToWyre'),
|
buttonLabel: this.context.t('continueToWyre'),
|
||||||
onButtonClick: () => toWyre(address),
|
onButtonClick: () => {
|
||||||
|
this.context.metricsEvent({
|
||||||
|
eventOpts: {
|
||||||
|
category: 'Accounts',
|
||||||
|
action: 'Deposit Ether',
|
||||||
|
name: 'Click buy Ether via Wyre',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
toWyre(address)
|
||||||
|
},
|
||||||
hide: isTestNetwork,
|
hide: isTestNetwork,
|
||||||
})}
|
})}
|
||||||
{this.renderRow({
|
{this.renderRow({
|
||||||
@ -157,7 +167,16 @@ export default class DepositEtherModal extends Component {
|
|||||||
title: this.context.t('buyCoinSwitch'),
|
title: this.context.t('buyCoinSwitch'),
|
||||||
text: this.context.t('buyCoinSwitchExplainer'),
|
text: this.context.t('buyCoinSwitchExplainer'),
|
||||||
buttonLabel: this.context.t('continueToCoinSwitch'),
|
buttonLabel: this.context.t('continueToCoinSwitch'),
|
||||||
onButtonClick: () => toCoinSwitch(address),
|
onButtonClick: () => {
|
||||||
|
this.context.metricsEvent({
|
||||||
|
eventOpts: {
|
||||||
|
category: 'Accounts',
|
||||||
|
action: 'Deposit Ether',
|
||||||
|
name: 'Click buy Ether via CoinSwitch',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
toCoinSwitch(address)
|
||||||
|
},
|
||||||
hide: isTestNetwork,
|
hide: isTestNetwork,
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user