Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.

Commit 083a459

Browse files
authored
Send back analytics on certain spinners durations (#5981)
* feat(spinner): add timer event to poll card event * feat(spinner): add timer to post-preview buy click * chore(wallet): code cleanup * feat(spinner): add analytic call to buy click * chore(wallet): code cleanup * feat(spinner): report on all possible cases on order confirm * feat(spinner): add indicator for origin * feat(spinner): correct track quote get * feat(spinner): use same name and properties as mobile
1 parent a2f9ca2 commit 083a459

6 files changed

Lines changed: 161 additions & 110 deletions

File tree

packages/blockchain-wallet-v4-frontend/src/data/analytics/types/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import {
4747
Events as SendCryptoEvents,
4848
TrackEventAction as SendCryptoTrackEventAction
4949
} from './sendCrypto'
50+
import { SpinnerEventAction, SpinnerEvents } from './spinner'
5051
import { Events as SwapEvents, TrackEventAction as SwapTrackEventAction } from './swap'
5152
import {
5253
Events as TaxCenterEvents,
@@ -81,6 +82,7 @@ type AnalyticsKey =
8182
| PlaidClientEvents
8283
| SellEvents
8384
| SendCryptoEvents
85+
| SpinnerEvents
8486
| SwapEvents
8587
| TaxCenterEvents
8688
| ViewAndClickEvents
@@ -100,6 +102,7 @@ const Analytics = {
100102
...OnboardingAndVerificationEvents,
101103
...PlaidClientEvents,
102104
...SendCryptoEvents,
105+
...SpinnerEvents,
103106
...SwapEvents,
104107
...TaxCenterEvents,
105108
...ViewAndClickEvents,
@@ -132,6 +135,7 @@ type TrackEventAction =
132135
| PlaidClientTrackEventAction
133136
| SellTrackEventAction
134137
| SendCryptoTrackEventAction
138+
| SpinnerEventAction
135139
| SwapTrackEventAction
136140
| TaxCenterTrackEventAction
137141
| TransactionsTrackEventAction

packages/blockchain-wallet-v4-frontend/src/data/analytics/types/misc.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ export enum Events {
77
}
88

99
type MiscTrackEventAction = {
10-
key:
11-
| Events.CUSTOMER_SUPPORT_CLICKED
12-
| Events.WRONG_CHANGE_CACHE
13-
| Events.WRONG_RECEIVE_CACHE
14-
| Events.SIGNUP_VIEWED
10+
key: Events
1511
properties: {}
1612
}
1713

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export enum SpinnerEvents {
2+
SPINNER_TIMED_OUT = 'Spinner Timed Out'
3+
}
4+
5+
export type SpinnerEventAction = {
6+
key: SpinnerEvents
7+
properties: {
8+
endpoint: string
9+
screen: string
10+
timeout: number
11+
}
12+
}

0 commit comments

Comments
 (0)