Skip to content

Commit

Permalink
fix: tracking events for user menu (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
braianj authored May 21, 2024
1 parent 2d99d31 commit a3c8c45
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions src/components/UserMenu/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export const UserMenu = React.memo((props: UserMenuProps) => {
event.preventDefault()
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.JUMP_IN,
trackingId,
type: UserMenuEventId.JUMP_IN,
track_uuid: trackingId,
url: config.get('EXPLORER_URL')
})

Expand All @@ -93,8 +93,8 @@ export const UserMenu = React.memo((props: UserMenuProps) => {
event.preventDefault()
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.SIGN_IN,
trackingId,
type: UserMenuEventId.SIGN_IN,
track_uuid: trackingId,
url: config.get('MARKETPLACE_URL')
})

Expand All @@ -111,7 +111,7 @@ export const UserMenu = React.memo((props: UserMenuProps) => {
event.preventDefault()
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.BALANCE
type: UserMenuEventId.BALANCE
})

setTimeout(
Expand Down
24 changes: 12 additions & 12 deletions src/components/UserMenu/UserMenuSignedIn/UserMenuSignedIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
(event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.ACTIVITY,
trackingId,
type: UserMenuEventId.ACTIVITY,
track_uuid: trackingId,
url: `${config.get('MARKETPLACE_URL')}/activity`
})
setTimeout(
Expand All @@ -68,8 +68,8 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
(event: React.MouseEvent<HTMLElement, MouseEvent>) => {
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.MY_ASSETS,
trackingId,
type: UserMenuEventId.MY_ASSETS,
track_uuid: trackingId,
url: config.get('MARKETPLACE_MY_ASSETS_URL')
})

Expand All @@ -93,8 +93,8 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
(event: React.MouseEvent<HTMLElement, MouseEvent>) => {
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.MARKETPLACE_AUTHORIZATIONS,
trackingId,
type: UserMenuEventId.MARKETPLACE_AUTHORIZATIONS,
track_uuid: trackingId,
url: config.get('MARKETPLACE_SETTINGS_URL')
})
setTimeout(
Expand All @@ -117,8 +117,8 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
(event: React.MouseEvent<HTMLElement, MouseEvent>) => {
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.PROFILE,
trackingId,
type: UserMenuEventId.PROFILE,
track_uuid: trackingId,
url: config.get('PROFILE_URL')
})

Expand All @@ -138,8 +138,8 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
(event: React.MouseEvent<HTMLElement, MouseEvent>) => {
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.ACCOUNT,
trackingId,
type: UserMenuEventId.ACCOUNT,
track_uuid: trackingId,
url: config.get('ACCOUNT_URL')
})

Expand All @@ -159,8 +159,8 @@ export const UserMenuSignedIn = (props: UserMenuSignedInProps) => {
(event: React.MouseEvent<HTMLElement, MouseEvent>) => {
onClickUserMenuItem &&
onClickUserMenuItem(event, {
eventTrackingName: UserMenuEventId.SIGN_OUT,
trackingId
type: UserMenuEventId.SIGN_OUT,
track_uuid: trackingId
})
onClickSignOut(event, trackingId)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ export type UserMenuSignedInProps = ManaBalancesProps & {
onClickAccount?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void
onClickUserMenuItem?: (
event: React.MouseEvent<HTMLElement, MouseEvent>,
options: { eventTrackingName: string; url?: string; trackingId?: string }
options: { type: string; url?: string; track_uuid?: string }
) => void
}

0 comments on commit a3c8c45

Please sign in to comment.