Skip to content

Commit

Permalink
Analytics: add a Confirm transaction event (#2849)
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 23, 2023
1 parent 56fe78e commit 14570dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks/useTxTracking.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 5 additions & 0 deletions src/services/analytics/events/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ export const TX_EVENTS = {
category: TX_CATEGORY,
// label: TX_TYPES,
},
CONFIRM: {
event: EventType.META,
action: 'Confirm transaction',
category: TX_CATEGORY,
},
}

0 comments on commit 14570dd

Please sign in to comment.