             event["test_group"] = articleAsLivingDocBucket.rawValue
         }
         
-        var autorizationStatus: UNAuthorizationStatus = .notDetermined
-        dataStore.notificationsController.notificationPermissionsStatus { status in
-            autorizationStatus = status
-        }
-        event["device_level_enabled"] = getDeviceNotificationStatus(autorizationStatus)
+        if let status = authorizationStatus {
+            event["device_level_enabled"] = getDeviceNotificationStatus(status)
+        }
         
         let inboxCount = dataStore.remoteNotificationsController.inboxCount()
         event["inbox_count"] = inboxCount

        guard isTarget else {
            return
        }
        log(event())
        // DDLogDebug("Attempted to log starting User History snapshot")
    }
}


            return
        }
        
        dataStore.notificationsController.notificationPermissionsStatus { [weak self] authorizationStatus in
            
            guard let self = self else {
                return
            }
            
            DispatchQueue.main.async {
                guard let lastAppVersion = UserDefaults.standard.wmf_lastAppVersion else {
                    self.log(self.event(authorizationStatus: authorizationStatus))
                    return
                }
                guard let latestSnapshot = self.latestSnapshot else {
                    return
                }
                
                let newSnapshot = self.event(authorizationStatus: authorizationStatus)
                
                guard !newSnapshot.wmf_isEqualTo(latestSnapshot, excluding: self.standardEvent.keys) || lastAppVersion != WikipediaAppUtils.appVersion() else {
                    // DDLogDebug("User History snapshots are identical; logging new User History snapshot aborted")
                    return
                }
                // DDLogDebug("User History snapshots are different; logging new User History snapshot")
                self.log(self.event(authorizationStatus: authorizationStatus))
            }
        }
    }
    
    @objc public func logStartingSnapshot() {
