diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 02:38:26 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-28 02:38:26 +0800 |
commit | 5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8 (patch) | |
tree | b6cf0826ba9de51b905e8116850f98947ed554a8 /packages/instant/src/redux/analytics_middleware.ts | |
parent | be787a0fd19a658cbf21eb90140c76779647dfbc (diff) | |
parent | d23fd23e912ef2ca646048e2df70e2c016ce9986 (diff) | |
download | dexon-sol-tools-5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8.tar dexon-sol-tools-5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8.tar.gz dexon-sol-tools-5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8.tar.bz2 dexon-sol-tools-5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8.tar.lz dexon-sol-tools-5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8.tar.xz dexon-sol-tools-5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8.tar.zst dexon-sol-tools-5fd837cc4fbb8d70d3e72fe05fa5bf33a0331ab8.zip |
Merge branch 'development' into feature/instant/dropdown-analytics
Diffstat (limited to 'packages/instant/src/redux/analytics_middleware.ts')
-rw-r--r-- | packages/instant/src/redux/analytics_middleware.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 299c2560e..8aa76eb77 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -53,6 +53,30 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction ).toString(); analytics.addUserProperties({ ethBalanceInUnitAmount }); } + break; + case ActionTypes.UPDATE_SELECTED_ASSET: + const selectedAsset = curState.selectedAsset; + if (selectedAsset) { + const assetName = selectedAsset.metaData.name; + const assetData = selectedAsset.assetData; + analytics.trackTokenSelectorChose({ + assetName, + assetData, + }); + analytics.addEventProperties({ + selectedAssetName: assetName, + selectedAssetData: assetData, + }); + } + break; + case ActionTypes.SET_AVAILABLE_ASSETS: + const availableAssets = curState.availableAssets; + if (availableAssets) { + analytics.addEventProperties({ + numberAvailableAssets: availableAssets.length, + }); + } + break; } return nextAction; |