aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/inputs
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-12 03:14:23 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-12 03:14:23 +0800
commit9131a72a47690912db9b536186d05120daabd115 (patch)
treeedbf0fb3b572a9422410b6fac9f47c103c1c0218 /packages/website/ts/components/inputs
parentd319b53e23047d4ff62415555475ef6da5f3d774 (diff)
downloaddexon-sol-tools-9131a72a47690912db9b536186d05120daabd115.tar
dexon-sol-tools-9131a72a47690912db9b536186d05120daabd115.tar.gz
dexon-sol-tools-9131a72a47690912db9b536186d05120daabd115.tar.bz2
dexon-sol-tools-9131a72a47690912db9b536186d05120daabd115.tar.lz
dexon-sol-tools-9131a72a47690912db9b536186d05120daabd115.tar.xz
dexon-sol-tools-9131a72a47690912db9b536186d05120daabd115.tar.zst
dexon-sol-tools-9131a72a47690912db9b536186d05120daabd115.zip
Replace calls to google analytics with calls to heap
Diffstat (limited to 'packages/website/ts/components/inputs')
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx
index 0d5995696..b3f1aead2 100644
--- a/packages/website/ts/components/inputs/allowance_toggle.tsx
+++ b/packages/website/ts/components/inputs/allowance_toggle.tsx
@@ -111,14 +111,16 @@ export class AllowanceToggle extends React.Component<AllowanceToggleProps, Allow
if (!this._isAllowanceSet()) {
newAllowanceAmountInBaseUnits = DEFAULT_ALLOWANCE_AMOUNT_IN_BASE_UNITS;
}
- const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
- const eventLabel = `${this.props.token.symbol}-${networkName}`;
+ const logData = {
+ tokenSymbol: this.props.token.symbol,
+ newAllowance: newAllowanceAmountInBaseUnits.toNumber(),
+ };
try {
await this.props.blockchain.setProxyAllowanceAsync(this.props.token, newAllowanceAmountInBaseUnits);
- analytics.logEvent('Portal', 'Set Allowance Success', eventLabel, newAllowanceAmountInBaseUnits.toNumber());
+ analytics.track('Set Allowances Success', logData);
await this.props.refetchTokenStateAsync();
} catch (err) {
- analytics.logEvent('Portal', 'Set Allowance Failure', eventLabel, newAllowanceAmountInBaseUnits.toNumber());
+ analytics.track('Set Allowance Failure', logData);
this.setState({
isSpinnerVisible: false,
});