diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-01 06:16:02 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-12-01 06:16:02 +0800 |
commit | d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7 (patch) | |
tree | 94b9cdf488dda700b512ecdf1c576df092f39841 /packages/instant/src/util/analytics.ts | |
parent | c342940b5d03d8496639feab9f2b305fe86c7240 (diff) | |
parent | 94d81bd5621535ca3a02ceb690ec963036b0ec6b (diff) | |
download | dexon-sol-tools-d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7.tar dexon-sol-tools-d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7.tar.gz dexon-sol-tools-d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7.tar.bz2 dexon-sol-tools-d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7.tar.lz dexon-sol-tools-d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7.tar.xz dexon-sol-tools-d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7.tar.zst dexon-sol-tools-d9b4b0e0f370bcb2f043f5f619a7d68c63a0f2d7.zip |
Merge branch 'development' into feature/instant/rollbar-env
Diffstat (limited to 'packages/instant/src/util/analytics.ts')
-rw-r--r-- | packages/instant/src/util/analytics.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index c4a007de6..e625824ef 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -7,6 +7,7 @@ import { AffiliateInfo, Asset, Network, + OrderProcessState, OrderSource, ProviderState, QuoteFetchOrigin, @@ -28,6 +29,7 @@ export const evaluateIfEnabled = (fnCall: () => void) => { enum EventNames { INSTANT_OPENED = 'Instant - Opened', + INSTANT_CLOSED = 'Instant - Closed', ACCOUNT_LOCKED = 'Account - Locked', ACCOUNT_READY = 'Account - Ready', ACCOUNT_UNLOCK_REQUESTED = 'Account - Unlock Requested', @@ -52,6 +54,7 @@ enum EventNames { TOKEN_SELECTOR_CLOSED = 'Token Selector - Closed', TOKEN_SELECTOR_CHOSE = 'Token Selector - Chose', TOKEN_SELECTOR_SEARCHED = 'Token Selector - Searched', + TRANSACTION_VIEWED = 'Transaction - Viewed', QUOTE_FETCHED = 'Quote - Fetched', QUOTE_ERROR = 'Quote - Error', } @@ -152,6 +155,7 @@ export const analytics = { return eventOptions; }, trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED), + trackInstantClosed: trackingEventFnWithoutPayload(EventNames.INSTANT_CLOSED), trackAccountLocked: trackingEventFnWithoutPayload(EventNames.ACCOUNT_LOCKED), trackAccountReady: (address: string) => trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ address }), trackAccountUnlockRequested: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_REQUESTED), @@ -204,6 +208,8 @@ export const analytics = { trackingEventFnWithPayload(EventNames.TOKEN_SELECTOR_CHOSE)(payload), trackTokenSelectorSearched: (searchText: string) => trackingEventFnWithPayload(EventNames.TOKEN_SELECTOR_SEARCHED)({ searchText }), + trackTransactionViewed: (orderProcesState: OrderProcessState) => + trackingEventFnWithPayload(EventNames.TRANSACTION_VIEWED)({ orderState: orderProcesState }), trackQuoteFetched: (buyQuote: BuyQuote, fetchOrigin: QuoteFetchOrigin) => trackingEventFnWithPayload(EventNames.QUOTE_FETCHED)({ ...buyQuoteEventProperties(buyQuote), |