From 3a9ccf5b478b041b0d31199ff083583e106922f2 Mon Sep 17 00:00:00 2001 From: katspaugh Date: Wed, 22 Nov 2023 17:38:38 +0100 Subject: [PATCH] Analytics: add a Confirm transaction event --- src/hooks/useTxTracking.ts | 2 ++ src/services/analytics/events/transactions.ts | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/hooks/useTxTracking.ts b/src/hooks/useTxTracking.ts index d62aa118ce..716752c1a0 100644 --- a/src/hooks/useTxTracking.ts +++ b/src/hooks/useTxTracking.ts @@ -1,10 +1,12 @@ import { trackEvent, WALLET_EVENTS } from '@/services/analytics' +import { TX_EVENTS } from '@/services/analytics/events/transactions' import { getTxDetails } from '@/services/tx/txDetails' import { TxEvent, txSubscribe } from '@/services/tx/txEvents' import { useEffect } from 'react' import useChainId from './useChainId' const events = { + [TxEvent.SIGNATURE_PROPOSED]: TX_EVENTS.CONFIRM, [TxEvent.SIGNED]: WALLET_EVENTS.OFFCHAIN_SIGNATURE, [TxEvent.PROCESSING]: WALLET_EVENTS.ONCHAIN_INTERACTION, [TxEvent.PROCESSING_MODULE]: WALLET_EVENTS.ONCHAIN_INTERACTION, diff --git a/src/services/analytics/events/transactions.ts b/src/services/analytics/events/transactions.ts index 7f33f5676c..4f3cf0e048 100644 --- a/src/services/analytics/events/transactions.ts +++ b/src/services/analytics/events/transactions.ts @@ -37,4 +37,9 @@ export const TX_EVENTS = { category: TX_CATEGORY, // label: TX_TYPES, }, + CONFIRM: { + event: EventType.META, + action: 'Confirm transaction', + category: TX_CATEGORY, + }, }