diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 07:28:38 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 07:28:38 +0800 |
commit | d3739488aed89ce98e805d48ec14a0d2608f85d7 (patch) | |
tree | c74e0f3f472d5e77cd2b57eddc515213555f7c7a /packages/instant/src/util/analytics.ts | |
parent | c5d6b925e4e04d5b6cfd0623d0a1449ba69d3a30 (diff) | |
download | dexon-sol-tools-d3739488aed89ce98e805d48ec14a0d2608f85d7.tar dexon-sol-tools-d3739488aed89ce98e805d48ec14a0d2608f85d7.tar.gz dexon-sol-tools-d3739488aed89ce98e805d48ec14a0d2608f85d7.tar.bz2 dexon-sol-tools-d3739488aed89ce98e805d48ec14a0d2608f85d7.tar.lz dexon-sol-tools-d3739488aed89ce98e805d48ec14a0d2608f85d7.tar.xz dexon-sol-tools-d3739488aed89ce98e805d48ec14a0d2608f85d7.tar.zst dexon-sol-tools-d3739488aed89ce98e805d48ec14a0d2608f85d7.zip |
Tracking quote errors
Diffstat (limited to 'packages/instant/src/util/analytics.ts')
-rw-r--r-- | packages/instant/src/util/analytics.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 204b6921d..dd6021453 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -1,4 +1,5 @@ import { BuyQuote } from '@0x/asset-buyer'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { AffiliateInfo, Asset, Network, OrderSource, ProviderState, QuoteFetchedVia } from '../types'; @@ -184,4 +185,19 @@ export const analytics = { ...buyQuoteEventProperties(buyQuote), fetchedVia, }), + trackQuoteError: ( + errorMessage: string, + assetName: string, + assetData: string, + assetAmount: BigNumber, + fetchedVia: QuoteFetchedVia, + ) => { + trackingEventFnWithPayload(EventNames.QUOTE_ERROR)({ + errorMessage, + assetName, + assetData, + assetAmount: assetAmount.toString(), + fetchedVia, + }); + }, }; |