Track notification open (#3274)
parent
0cac671e8a
commit
ebf8644df9
|
@ -7,6 +7,7 @@ import {logger} from '#/logger'
|
||||||
import {RQKEY as RQKEY_NOTIFS} from '#/state/queries/notifications/feed'
|
import {RQKEY as RQKEY_NOTIFS} from '#/state/queries/notifications/feed'
|
||||||
import {truncateAndInvalidate} from '#/state/queries/util'
|
import {truncateAndInvalidate} from '#/state/queries/util'
|
||||||
import {SessionAccount, getAgent} from '#/state/session'
|
import {SessionAccount, getAgent} from '#/state/session'
|
||||||
|
import {logEvent} from '../statsig/statsig'
|
||||||
|
|
||||||
const SERVICE_DID = (serviceUrl?: string) =>
|
const SERVICE_DID = (serviceUrl?: string) =>
|
||||||
serviceUrl?.includes('staging')
|
serviceUrl?.includes('staging')
|
||||||
|
@ -123,6 +124,7 @@ export function init(queryClient: QueryClient) {
|
||||||
logger.DebugContext.notifications,
|
logger.DebugContext.notifications,
|
||||||
)
|
)
|
||||||
track('Notificatons:OpenApp')
|
track('Notificatons:OpenApp')
|
||||||
|
logEvent('notifications:openApp', {})
|
||||||
truncateAndInvalidate(queryClient, RQKEY_NOTIFS())
|
truncateAndInvalidate(queryClient, RQKEY_NOTIFS())
|
||||||
resetToTab('NotificationsTab') // open notifications tab
|
resetToTab('NotificationsTab') // open notifications tab
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ export type LogEvents = {
|
||||||
init: {
|
init: {
|
||||||
initMs: number
|
initMs: number
|
||||||
}
|
}
|
||||||
|
'notifications:openApp': {}
|
||||||
'state:background': {}
|
'state:background': {}
|
||||||
'state:foreground': {}
|
'state:foreground': {}
|
||||||
'feed:endReached': {
|
'feed:endReached': {
|
||||||
|
|
Loading…
Reference in New Issue