Add analytics event for when the app is opened from a notification (#1270)
* Add analytics event for when the app is opened from a notification * Tweak notification IDzio/stable
parent
a115c17a09
commit
c6f321862b
|
@ -86,6 +86,8 @@ interface TrackPropertiesMap {
|
|||
'MobileShell:SearchButtonPressed': {}
|
||||
'MobileShell:NotificationsButtonPressed': {}
|
||||
'MobileShell:FeedsButtonPressed': {}
|
||||
// NOTIFICATIONS events
|
||||
'Notificatons:OpenApp': {}
|
||||
// LISTS events
|
||||
'Lists:onRefresh': {}
|
||||
'Lists:onEndReached': {}
|
||||
|
|
|
@ -2,6 +2,7 @@ import * as Notifications from 'expo-notifications'
|
|||
import {RootStoreModel} from '../../state'
|
||||
import {resetToTab} from '../../Navigation'
|
||||
import {devicePlatform, isIOS} from 'platform/detection'
|
||||
import {track} from 'lib/analytics/analytics'
|
||||
|
||||
const SERVICE_DID = (serviceUrl?: string) =>
|
||||
serviceUrl?.includes('staging')
|
||||
|
@ -89,6 +90,7 @@ export function init(store: RootStoreModel) {
|
|||
store.log.debug(
|
||||
'User pressed a notification, opening notifications tab',
|
||||
)
|
||||
track('Notificatons:OpenApp')
|
||||
resetToTab('NotificationsTab')
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue