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:SearchButtonPressed': {}
|
||||||
'MobileShell:NotificationsButtonPressed': {}
|
'MobileShell:NotificationsButtonPressed': {}
|
||||||
'MobileShell:FeedsButtonPressed': {}
|
'MobileShell:FeedsButtonPressed': {}
|
||||||
|
// NOTIFICATIONS events
|
||||||
|
'Notificatons:OpenApp': {}
|
||||||
// LISTS events
|
// LISTS events
|
||||||
'Lists:onRefresh': {}
|
'Lists:onRefresh': {}
|
||||||
'Lists:onEndReached': {}
|
'Lists:onEndReached': {}
|
||||||
|
|
|
@ -2,6 +2,7 @@ import * as Notifications from 'expo-notifications'
|
||||||
import {RootStoreModel} from '../../state'
|
import {RootStoreModel} from '../../state'
|
||||||
import {resetToTab} from '../../Navigation'
|
import {resetToTab} from '../../Navigation'
|
||||||
import {devicePlatform, isIOS} from 'platform/detection'
|
import {devicePlatform, isIOS} from 'platform/detection'
|
||||||
|
import {track} from 'lib/analytics/analytics'
|
||||||
|
|
||||||
const SERVICE_DID = (serviceUrl?: string) =>
|
const SERVICE_DID = (serviceUrl?: string) =>
|
||||||
serviceUrl?.includes('staging')
|
serviceUrl?.includes('staging')
|
||||||
|
@ -89,6 +90,7 @@ export function init(store: RootStoreModel) {
|
||||||
store.log.debug(
|
store.log.debug(
|
||||||
'User pressed a notification, opening notifications tab',
|
'User pressed a notification, opening notifications tab',
|
||||||
)
|
)
|
||||||
|
track('Notificatons:OpenApp')
|
||||||
resetToTab('NotificationsTab')
|
resetToTab('NotificationsTab')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue