Skip to content

Commit

Permalink
Merge pull request #21 from lidofinance/feature/ui-701-phantom-bitkee…
Browse files Browse the repository at this point in the history
…p-matomo-metrics-to-eth-stake-widget

feat: add wallet metrics for Phantom, BitKeep
  • Loading branch information
Mimidze authored Aug 25, 2023
2 parents 72ec8d0 + 43b3cdc commit 8b8cbb1
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions config/matomoWalletsEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export const enum MATOMO_WALLETS_EVENTS_TYPES {
onConnectZerion = 'onConnectZerion',
onClickOkx = 'onClickOkx',
onConnectOkx = 'onConnectOkx',
onClickPhantom = 'onClickPhantom',
onConnectPhantom = 'onConnectPhantom',
onClickBitkeep = 'onClickBitkeep',
onConnectBitkeep = 'onConnectBitkeep',
}

export const MATOMO_WALLETS_EVENTS: Record<
Expand Down Expand Up @@ -236,6 +240,26 @@ export const MATOMO_WALLETS_EVENTS: Record<
'Connect OKX wallet',
'eth_widget_connect_okx',
],
[MATOMO_WALLETS_EVENTS_TYPES.onClickPhantom]: [
'Ethereum_Staking_Widget',
'Click Phantom wallet',
'eth_widget_click_phantom',
],
[MATOMO_WALLETS_EVENTS_TYPES.onConnectPhantom]: [
'Ethereum_Staking_Widget',
'Connect Phantom wallet',
'eth_widget_connect_phantom',
],
[MATOMO_WALLETS_EVENTS_TYPES.onClickBitkeep]: [
'Ethereum_Staking_Widget',
'Click BitKeep wallet',
'eth_widget_click_bitkeep',
],
[MATOMO_WALLETS_EVENTS_TYPES.onConnectBitkeep]: [
'Ethereum_Staking_Widget',
'Connect BitKeep wallet',
'eth_widget_connect_bitkeep',
],
};

export const walletsMetrics: WalletsMetrics = {
Expand Down Expand Up @@ -299,6 +323,12 @@ export const walletsMetrics: WalletsMetrics = {
onClickOkx: () => {
trackEvent(...MATOMO_WALLETS_EVENTS.onClickOkx);
},
onClickPhantom: () => {
trackEvent(...MATOMO_WALLETS_EVENTS.onClickPhantom);
},
onClickBitkeep: () => {
trackEvent(...MATOMO_WALLETS_EVENTS.onClickBitkeep);
},
},
},
connect: {
Expand Down Expand Up @@ -360,6 +390,12 @@ export const walletsMetrics: WalletsMetrics = {
onConnectOkx: () => {
trackEvent(...MATOMO_WALLETS_EVENTS.onConnectOkx);
},
onConnectPhantom: () => {
trackEvent(...MATOMO_WALLETS_EVENTS.onConnectPhantom);
},
onConnectBitkeep: () => {
trackEvent(...MATOMO_WALLETS_EVENTS.onConnectBitkeep);
},
},
},
},
Expand Down

0 comments on commit 8b8cbb1

Please sign in to comment.