aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/analytics.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/analytics.ts')
-rw-r--r--packages/instant/src/util/analytics.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts
index 50bab174f..cd1074cba 100644
--- a/packages/instant/src/util/analytics.ts
+++ b/packages/instant/src/util/analytics.ts
@@ -21,6 +21,7 @@ enum EventNames {
TOKEN_SELECTOR_OPENED = 'Token Selector - Opened',
TOKEN_SELECTOR_CLOSED = 'Token Selector - Closed',
TOKEN_SELECTOR_CHOSE = 'Token Selector - Chose',
+ TOKEN_SELECTOR_SEARCHED = 'Token Selector - Searched',
}
const track = (eventName: EventNames, eventProperties: EventProperties = {}): void => {
evaluateIfEnabled(() => {
@@ -74,4 +75,6 @@ export const analytics = {
trackTokenSelectorClosed: trackingEventFnWithoutPayload(EventNames.TOKEN_SELECTOR_CLOSED),
trackTokenSelectorChose: (payload: { assetName: string; assetData: string }) =>
trackingEventFnWithPayload(EventNames.TOKEN_SELECTOR_CHOSE)(payload),
+ trackTokenSelectorSearched: (searchText: string) =>
+ trackingEventFnWithPayload(EventNames.TOKEN_SELECTOR_SEARCHED)({ searchText }),
};