From c172b9e0800dd9ed959b03e7ee418b9787c70c38 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Tue, 6 Feb 2018 16:25:50 -0800
Subject: Add networkId to event label

---
 packages/website/ts/components/fill_order.tsx | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

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

diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx
index 9da3006a0..97f616be2 100644
--- a/packages/website/ts/components/fill_order.tsx
+++ b/packages/website/ts/components/fill_order.tsx
@@ -561,6 +561,8 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
             });
             return;
         }
+        const networkName = constants.NETWORK_NAME_BY_ID[this.props.networkId];
+        const eventLabel = `${parsedOrder.taker.token.symbol}-${networkName}`;
         try {
             const orderFilledAmount: BigNumber = await this.props.blockchain.fillOrderAsync(
                 signedOrder,
@@ -569,7 +571,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
             ReactGA.event({
                 category: 'Portal',
                 action: 'Fill Order Success',
-                label: parsedOrder.taker.token.symbol,
+                label: eventLabel,
                 value: parsedOrder.taker.amount,
             });
             // After fill completes, let's force fetch the token balances
@@ -588,7 +590,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
             ReactGA.event({
                 category: 'Portal',
                 action: 'Fill Order Failure',
-                label: parsedOrder.taker.token.symbol,
+                label: eventLabel,
                 value: parsedOrder.taker.amount,
             });
             const errMsg = `${err}`;
@@ -658,6 +660,8 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
             });
             return;
         }
+        const networkName = constants.NETWORK_NAME_BY_ID[this.props.networkId];
+        const eventLabel = `${parsedOrder.maker.token.symbol}-${networkName}`;
         try {
             await this.props.blockchain.cancelOrderAsync(signedOrder, availableTakerTokenAmount);
             this.setState({
@@ -669,7 +673,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
             ReactGA.event({
                 category: 'Portal',
                 action: 'Cancel Order Success',
-                label: parsedOrder.maker.token.symbol,
+                label: eventLabel,
                 value: parsedOrder.maker.amount,
             });
             return;
@@ -684,7 +688,7 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
             ReactGA.event({
                 category: 'Portal',
                 action: 'Cancel Order Failure',
-                label: parsedOrder.maker.token.symbol,
+                label: eventLabel,
                 value: parsedOrder.maker.amount,
             });
             globalErrMsg = 'Failed to cancel order, please refresh and try again';
-- 
cgit v1.2.3

