Add metrics events for Wyre and CoinSwitch (#8677)

feature/default_network_editable
Whymarrh Whitby 4 years ago committed by GitHub
parent f8137b7a66
commit 93c2184bd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      ui/app/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js

@ -6,6 +6,7 @@ import Button from '../../../ui/button'
export default class DepositEtherModal extends Component {
static contextTypes = {
t: PropTypes.func,
metricsEvent: PropTypes.func.isRequired,
}
static propTypes = {
@ -141,7 +142,16 @@ export default class DepositEtherModal extends Component {
title: this.context.t('buyWithWyre'),
text: this.context.t('buyWithWyreDescription'),
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,
})}
{this.renderRow({
@ -157,7 +167,16 @@ export default class DepositEtherModal extends Component {
title: this.context.t('buyCoinSwitch'),
text: this.context.t('buyCoinSwitchExplainer'),
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,
})}
</div>

Loading…
Cancel
Save