diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 05:30:28 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 05:33:34 +0800 |
commit | 462a5face9b2b24c1e9d20a6b894809faa512232 (patch) | |
tree | 02cbd4ccfa6be272b8c0a6260884b90778b6c333 /packages/instant/src/redux/analytics_middleware.ts | |
parent | b50187f59c09d4ecf7a840fd22f96bcecd14bb1b (diff) | |
download | dexon-0x-contracts-462a5face9b2b24c1e9d20a6b894809faa512232.tar.gz dexon-0x-contracts-462a5face9b2b24c1e9d20a6b894809faa512232.tar.zst dexon-0x-contracts-462a5face9b2b24c1e9d20a6b894809faa512232.zip |
feat(instant): Install Wallet analytics
Diffstat (limited to 'packages/instant/src/redux/analytics_middleware.ts')
-rw-r--r-- | packages/instant/src/redux/analytics_middleware.ts | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 8aa76eb77..3dc5fe924 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import { Middleware } from 'redux'; import { ETH_DECIMALS } from '../constants'; -import { Account, AccountState } from '../types'; +import { Account, AccountState, StandardSlidingPanelContent } from '../types'; import { analytics } from '../util/analytics'; import { Action, ActionTypes } from './actions'; @@ -77,6 +77,18 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction }); } break; + case ActionTypes.OPEN_STANDARD_SLIDING_PANEL: + const openSlidingContent = curState.standardSlidingPanelSettings.content; + if (openSlidingContent === StandardSlidingPanelContent.InstallWallet) { + analytics.trackInstallWalletModalOpened(); + } + break; + case ActionTypes.CLOSE_STANDARD_SLIDING_PANEL: + const closeSlidingContent = curState.standardSlidingPanelSettings.content; + if (closeSlidingContent === StandardSlidingPanelContent.InstallWallet) { + analytics.trackInstallWalletModalClosed(); + } + break; } return nextAction; |