Skip to content

Commit

Permalink
Analytics: add a Confirm transaction event
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 22, 2023
1 parent 56fe78e commit 3a9ccf5
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 3a9ccf5

Please sign in to comment.