diff options
author | Steve Klebanoff <steve@0xproject.com> | 2018-11-29 06:01:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 06:01:07 +0800 |
commit | e5b09ba2fd366e485a864bc5819ebde5338f166c (patch) | |
tree | d2c7e80d7a71bab5d311a111dc7490dc6863c0e1 /packages/instant/src/redux/analytics_middleware.ts | |
parent | 53f8e1b3b426424bf4459605b48e706eb7fb6d90 (diff) | |
parent | b95d73d176db7df99381a25270e98d5bcf954707 (diff) | |
download | dexon-sol-tools-e5b09ba2fd366e485a864bc5819ebde5338f166c.tar dexon-sol-tools-e5b09ba2fd366e485a864bc5819ebde5338f166c.tar.gz dexon-sol-tools-e5b09ba2fd366e485a864bc5819ebde5338f166c.tar.bz2 dexon-sol-tools-e5b09ba2fd366e485a864bc5819ebde5338f166c.tar.lz dexon-sol-tools-e5b09ba2fd366e485a864bc5819ebde5338f166c.tar.xz dexon-sol-tools-e5b09ba2fd366e485a864bc5819ebde5338f166c.tar.zst dexon-sol-tools-e5b09ba2fd366e485a864bc5819ebde5338f166c.zip |
Merge pull request #1341 from 0xProject/feature/instant/install-analytics
[instant] Install Wallet analytic events
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; |