diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 03:25:51 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 03:25:51 +0800 |
commit | b50187f59c09d4ecf7a840fd22f96bcecd14bb1b (patch) | |
tree | 6d6f679365653759787689d3237a6c9903f610c6 /packages/instant/src/util | |
parent | 4653e4c011410b67b0be0335aa1f44dfade86a2e (diff) | |
download | dexon-sol-tools-b50187f59c09d4ecf7a840fd22f96bcecd14bb1b.tar dexon-sol-tools-b50187f59c09d4ecf7a840fd22f96bcecd14bb1b.tar.gz dexon-sol-tools-b50187f59c09d4ecf7a840fd22f96bcecd14bb1b.tar.bz2 dexon-sol-tools-b50187f59c09d4ecf7a840fd22f96bcecd14bb1b.tar.lz dexon-sol-tools-b50187f59c09d4ecf7a840fd22f96bcecd14bb1b.tar.xz dexon-sol-tools-b50187f59c09d4ecf7a840fd22f96bcecd14bb1b.tar.zst dexon-sol-tools-b50187f59c09d4ecf7a840fd22f96bcecd14bb1b.zip |
Track install wallet clicked
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r-- | packages/instant/src/util/analytics.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 2bb974254..e35a9e13f 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -1,7 +1,7 @@ import { BuyQuote } from '@0x/asset-buyer'; import * as _ from 'lodash'; -import { AffiliateInfo, Asset, Network, OrderSource, ProviderState } from '../types'; +import { AffiliateInfo, Asset, Network, OrderSource, ProviderState, WalletSuggestion } from '../types'; import { EventProperties, heapUtil } from './heap'; @@ -30,6 +30,7 @@ enum EventNames { BUY_TX_SUBMITTED = 'Buy - Tx Submitted', BUY_TX_SUCCEEDED = 'Buy - Tx Succeeded', BUY_TX_FAILED = 'Buy - Tx Failed', + INSTALL_WALLET_CLICKED = 'Install Wallet - Clicked', TOKEN_SELECTOR_OPENED = 'Token Selector - Opened', TOKEN_SELECTOR_CLOSED = 'Token Selector - Closed', TOKEN_SELECTOR_CHOSE = 'Token Selector - Chose', @@ -164,6 +165,8 @@ export const analytics = { expectedTxTimeMs: expectedEndTimeUnix - startTimeUnix, actualTxTimeMs: new Date().getTime() - startTimeUnix, }), + trackInstallWalletClicked: (walletSuggestion: WalletSuggestion) => + trackingEventFnWithPayload(EventNames.INSTALL_WALLET_CLICKED)({ walletSuggestion }), trackTokenSelectorOpened: trackingEventFnWithoutPayload(EventNames.TOKEN_SELECTOR_OPENED), trackTokenSelectorClosed: (closedVia: TokenSelectorClosedVia) => trackingEventFnWithPayload(EventNames.TOKEN_SELECTOR_CLOSED)({ closedVia }), |