File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
WooCommerce/Classes/Notifications Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -524,8 +524,13 @@ private extension PushNotificationsManager {
524524 properties [ AnalyticKey . fromSelectedSite] = siteID == notificationSiteID
525525 }
526526
527- let event : WooAnalyticsStat = ( applicationState == . background) ? . pushNotificationReceived : . pushNotificationAlertPressed
528- ServiceLocator . analytics. track ( event, withProperties: properties)
527+ switch applicationState {
528+ case . inactive:
529+ ServiceLocator . analytics. track ( . pushNotificationAlertPressed, withProperties: properties)
530+ default :
531+ properties [ AnalyticKey . appState] = applicationState. rawValue
532+ ServiceLocator . analytics. track ( . pushNotificationReceived, withProperties: properties)
533+ }
529534 }
530535}
531536
@@ -605,6 +610,7 @@ private enum AnalyticKey {
605610 static let type = " push_notification_type "
606611 static let token = " push_notification_token "
607612 static let fromSelectedSite = " is_from_selected_site "
613+ static let appState = " app_state "
608614}
609615
610616private enum PushType {
You can’t perform that action at this time.
0 commit comments