diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-27 07:04:02 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-27 07:04:02 +0800 |
commit | ae570dba05cfc0d696c616d05804152791d29677 (patch) | |
tree | 3b94352af39dd42de038663167e90d9eca441803 /packages/instant/src/util | |
parent | 9206f2d288f33367877d2d557d50f1d485d4b92e (diff) | |
download | dexon-sol-tools-ae570dba05cfc0d696c616d05804152791d29677.tar dexon-sol-tools-ae570dba05cfc0d696c616d05804152791d29677.tar.gz dexon-sol-tools-ae570dba05cfc0d696c616d05804152791d29677.tar.bz2 dexon-sol-tools-ae570dba05cfc0d696c616d05804152791d29677.tar.lz dexon-sol-tools-ae570dba05cfc0d696c616d05804152791d29677.tar.xz dexon-sol-tools-ae570dba05cfc0d696c616d05804152791d29677.tar.zst dexon-sol-tools-ae570dba05cfc0d696c616d05804152791d29677.zip |
feat(instant): Event tracking for token selector
Diffstat (limited to 'packages/instant/src/util')
-rw-r--r-- | packages/instant/src/util/analytics.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index cd1074cba..8f8cec284 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -52,7 +52,10 @@ export interface AnalyticsEventOptions { gitSha?: string; npmVersion?: string; } - +export enum TokenSelectorClosedVia { + ClickedX = 'Clicked X', + TokenChose = 'Token Chose', +} export const analytics = { addUserProperties: (properties: AnalyticsUserOptions): void => { evaluateIfEnabled(() => { @@ -73,6 +76,8 @@ export const analytics = { trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ address }), trackTokenSelectorOpened: trackingEventFnWithoutPayload(EventNames.TOKEN_SELECTOR_OPENED), trackTokenSelectorClosed: trackingEventFnWithoutPayload(EventNames.TOKEN_SELECTOR_CLOSED), + trackTokenSelectorClosed: (closedVia: TokenSelectorClosedVia) => + trackingEventFnWithPayload(EventNames.TOKEN_SELECTOR_CLOSED)({ closedVia }), trackTokenSelectorChose: (payload: { assetName: string; assetData: string }) => trackingEventFnWithPayload(EventNames.TOKEN_SELECTOR_CHOSE)(payload), trackTokenSelectorSearched: (searchText: string) => |