diff options
Diffstat (limited to 'packages/website/ts/components/generate_order')
-rw-r--r-- | packages/website/ts/components/generate_order/generate_order_form.tsx | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/packages/website/ts/components/generate_order/generate_order_form.tsx b/packages/website/ts/components/generate_order/generate_order_form.tsx index 26fa904fe..5e356528e 100644 --- a/packages/website/ts/components/generate_order/generate_order_form.tsx +++ b/packages/website/ts/components/generate_order/generate_order_form.tsx @@ -5,7 +5,6 @@ import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; import Divider from 'material-ui/Divider'; import * as React from 'react'; -import * as ReactGA from 'react-ga'; import { Blockchain } from 'ts/blockchain'; import { ExpirationInput } from 'ts/components/inputs/expiration_input'; import { HashInput } from 'ts/components/inputs/hash_input'; @@ -23,6 +22,7 @@ import { validator } from 'ts/schemas/validator'; import { AlertTypes, BlockchainErrs, HashData, Side, SideToAssetToken, Token, TokenByAddress } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { errorReporter } from 'ts/utils/error_reporter'; +import { analytics } from 'ts/utils/analytics'; import { utils } from 'ts/utils/utils'; enum SigningState { @@ -255,12 +255,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G if (didSignSuccessfully) { const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId]; const eventLabel = `${this.props.tokenByAddress[debitToken.address].symbol}-${networkName}`; - ReactGA.event({ - category: 'Portal', - action: 'Sign Order Success', - label: eventLabel, - value: debitToken.amount.toNumber(), - }); + analytics.logEvent('Portal', 'Sign Order Success', eventLabel, debitToken.amount.toNumber()); this.setState({ globalErrMsg: '', shouldShowIncompleteErrs: false, @@ -273,11 +268,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G globalErrMsg = 'You must enable wallet communication'; this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true); } - ReactGA.event({ - category: 'Portal', - action: 'Sign Order Failure', - label: globalErrMsg, - }); + analytics.logEvent('Portal', 'Sign Order Failure', globalErrMsg); this.setState({ globalErrMsg, shouldShowIncompleteErrs: true, |