From 9131a72a47690912db9b536186d05120daabd115 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Wed, 11 Jul 2018 12:14:23 -0700
Subject: Replace calls to google analytics with calls to heap

---
 packages/website/ts/components/wallet/wallet.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 6c1c495d7..940cd6c58 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -491,7 +491,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
         const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
         const action =
             wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened';
-        analytics.logEvent('Portal', action, networkName);
+        analytics.track(action);
         this.setState({
             wrappedEtherDirection,
         });
@@ -500,7 +500,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
         const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
         const action =
             wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed';
-        analytics.logEvent('Portal', action, networkName);
+        analytics.track(action);
         this.setState({
             wrappedEtherDirection: undefined,
         });
-- 
cgit 


From 098322c56475581df5bd80e12cb6c511963e4daf Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Wed, 11 Jul 2018 15:39:12 -0700
Subject: Integrate heap analytics

---
 packages/website/ts/components/wallet/wallet.tsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 940cd6c58..2fdcded38 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -1,4 +1,4 @@
-import { constants as sharedConstants, EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared';
+import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared';
 import { BigNumber, errorUtils } from '@0xproject/utils';
 import * as _ from 'lodash';
 
@@ -488,19 +488,17 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
         );
     }
     private _openWrappedEtherActionRow(wrappedEtherDirection: Side): void {
-        const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
         const action =
             wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened';
-        analytics.track(action);
+        analytics.trackAsync(action);
         this.setState({
             wrappedEtherDirection,
         });
     }
     private _closeWrappedEtherActionRow(wrappedEtherDirection: Side): void {
-        const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
         const action =
             wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed';
-        analytics.track(action);
+        analytics.trackAsync(action);
         this.setState({
             wrappedEtherDirection: undefined,
         });
-- 
cgit 


From 0941e0a929f2fe3ef6d0cf1de5a1274f5f45f031 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Wed, 11 Jul 2018 16:50:00 -0700
Subject: Add no-floating-promises ignore comments

---
 packages/website/ts/components/wallet/wallet.tsx | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

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,
-- 
cgit 


From 1df074b73e05adf669b0cedc4bb1473e9e5631db Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Thu, 12 Jul 2018 16:57:03 -0700
Subject: Make Analytics API non-async

---
 packages/website/ts/components/wallet/wallet.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 8523b819a..e462ab3e0 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -490,8 +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);
+        analytics.track(action);
         this.setState({
             wrappedEtherDirection,
         });
@@ -499,8 +498,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);
+        analytics.track(action);
         this.setState({
             wrappedEtherDirection: undefined,
         });
-- 
cgit 

