aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r--packages/website/ts/components/fill_order.tsx1
-rw-r--r--packages/website/ts/components/forms/subscribe_form.tsx1
-rw-r--r--packages/website/ts/components/generate_order/generate_order_form.tsx2
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx2
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx2
-rw-r--r--packages/website/ts/components/portal/portal.tsx1
-rw-r--r--packages/website/ts/components/relayer_index/relayer_grid_tile.tsx1
-rw-r--r--packages/website/ts/components/relayer_index/relayer_top_tokens.tsx7
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx2
-rw-r--r--packages/website/ts/components/wallet/wrap_ether_item.tsx4
10 files changed, 18 insertions, 5 deletions
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx
index 25d21c3dd..e4838bc0f 100644
--- a/packages/website/ts/components/fill_order.tsx
+++ b/packages/website/ts/components/fill_order.tsx
@@ -508,6 +508,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
}
private _trackOrderEvent(eventName: string): void {
const parsedOrder = this.state.parsedOrder;
+ // tslint:disable-next-line:no-floating-promises
analytics.trackOrderEventAsync(eventName, parsedOrder);
}
private async _onFillOrderClickFireAndForgetAsync(): Promise<void> {
diff --git a/packages/website/ts/components/forms/subscribe_form.tsx b/packages/website/ts/components/forms/subscribe_form.tsx
index 19abbdf5f..be0468b6f 100644
--- a/packages/website/ts/components/forms/subscribe_form.tsx
+++ b/packages/website/ts/components/forms/subscribe_form.tsx
@@ -114,6 +114,7 @@ export class SubscribeForm extends React.Component<SubscribeFormProps, Subscribe
const response = await backendClient.subscribeToNewsletterAsync(this.state.emailText);
const status = response.status === 200 ? SubscribeFormStatus.Success : SubscribeFormStatus.Error;
if (status === SubscribeFormStatus.Success) {
+ // tslint:disable-next-line:no-floating-promises
analytics.indentifyAsync(this.state.emailText, 'email');
}
this.setState({ status, emailText: '' });
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 691abd4aa..524960aa7 100644
--- a/packages/website/ts/components/generate_order/generate_order_form.tsx
+++ b/packages/website/ts/components/generate_order/generate_order_form.tsx
@@ -268,6 +268,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G
const signedOrder = await this._signTransactionAsync();
const doesSignedOrderExist = !_.isUndefined(signedOrder);
if (doesSignedOrderExist) {
+ // tslint:disable-next-line:no-floating-promises
analytics.trackOrderEventAsync('Sign Order Success', signedOrder);
this.setState({
globalErrMsg: '',
@@ -281,6 +282,7 @@ export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, G
globalErrMsg = 'You must enable wallet communication';
this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
}
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Sign Order Failure', {
makerTokenAmount: debitToken.amount.toString(),
makerToken: this.props.tokenByAddress[debitToken.address].symbol,
diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx
index 8e9d4fe8d..6f4ffa320 100644
--- a/packages/website/ts/components/inputs/allowance_toggle.tsx
+++ b/packages/website/ts/components/inputs/allowance_toggle.tsx
@@ -117,9 +117,11 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
};
try {
await this.props.blockchain.setProxyAllowanceAsync(this.props.token, newAllowanceAmountInBaseUnits);
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Set Allowances Success', logData);
await this.props.refetchTokenStateAsync();
} catch (err) {
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Set Allowance Failure', logData);
this.setState({
isSpinnerVisible: false,
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
index 516fdac3c..e051d86d9 100644
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
@@ -224,6 +224,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
(this.props.stepIndex === 0 && !this.props.isRunning && this.props.blockchainIsLoaded) ||
(!this.props.isRunning && !this.props.hasBeenClosed && this.props.blockchainIsLoaded)
) {
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Onboarding Started', {
reason: 'automatic',
stepIndex: this.props.stepIndex,
@@ -236,6 +237,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
}
private _closeOnboarding(): void {
this.props.updateIsRunning(false);
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('OnboardingClosed', {
stepIndex: this.props.stepIndex,
});
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx
index f5ac3b6f3..fbaa419d8 100644
--- a/packages/website/ts/components/portal/portal.tsx
+++ b/packages/website/ts/components/portal/portal.tsx
@@ -389,6 +389,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
);
}
private _startOnboarding(): void {
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Onboarding Started', {
reason: 'manual',
stepIndex: this.props.portalOnboardingStep,
diff --git a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
index 937f0b79d..475b79f8f 100644
--- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
@@ -65,6 +65,7 @@ export const RelayerGridTile: React.StatelessComponent<RelayerGridTileProps> = (
const topTokens = props.relayerInfo.topTokens;
const weeklyTxnVolume = props.relayerInfo.weeklyTxnVolume;
const onClick = () => {
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Relayer Click', {
name: props.relayerInfo.name,
});
diff --git a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
index e6e0095c2..33783b406 100644
--- a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
+++ b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
@@ -1,8 +1,4 @@
-import {
- colors,
- EtherscanLinkSuffixes,
- utils as sharedUtils,
-} from '@0xproject/react-shared';
+import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared';
import * as _ from 'lodash';
import * as React from 'react';
@@ -47,6 +43,7 @@ class TokenLink extends React.Component<TokenLinkProps, TokenLinkState> {
public render(): React.ReactNode {
const onClick = (event: React.MouseEvent<HTMLElement>) => {
event.stopPropagation();
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Token Click', {
tokenSymbol: this.props.tokenInfo.symbol,
});
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 2fdcded38..8523b819a 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -490,6 +490,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
private _openWrappedEtherActionRow(wrappedEtherDirection: Side): void {
const action =
wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened';
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync(action);
this.setState({
wrappedEtherDirection,
@@ -498,6 +499,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
private _closeWrappedEtherActionRow(wrappedEtherDirection: Side): void {
const action =
wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed';
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync(action);
this.setState({
wrappedEtherDirection: undefined,
diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx
index 9fec8afa1..9e3d06817 100644
--- a/packages/website/ts/components/wallet/wrap_ether_item.tsx
+++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx
@@ -196,12 +196,14 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther
if (this.props.direction === Side.Deposit) {
await this.props.blockchain.convertEthToWrappedEthTokensAsync(etherToken.address, amountToConvert);
this.props.dispatcher.showFlashMessage(`Successfully wrapped ${ethAmount} ETH to WETH`);
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Wrap ETH Success', {
amount: ethAmount,
});
} else {
await this.props.blockchain.convertWrappedEthTokensToEthAsync(etherToken.address, amountToConvert);
this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount} WETH to ETH`);
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Unwrap WETH Success', {
amount: tokenAmount,
});
@@ -217,11 +219,13 @@ export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEther
logUtils.log(err.stack);
if (this.props.direction === Side.Deposit) {
this.props.dispatcher.showFlashMessage('Failed to wrap your ETH. Please try again.');
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Wrap ETH Failure', {
amount: ethAmount,
});
} else {
this.props.dispatcher.showFlashMessage('Failed to unwrap your WETH. Please try again.');
+ // tslint:disable-next-line:no-floating-promises
analytics.trackAsync('Unwrap WETH Failed', {
amount: tokenAmount,
});