diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index 79240a52de..42def30fc4 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -512,6 +512,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } private func stopTunnelAndShowThankYouMessagingIfNeeded() { + if AccountManager().isUserAuthenticated { + tunnelDefaults.vpnEarlyAccessOverAlertAlreadyShown = true + return + } + if vpnFeatureVisibility.shouldShowThankYouMessaging() && !tunnelDefaults.vpnEarlyAccessOverAlertAlreadyShown { presentVPNEarlyAccessOverAlert() @@ -519,7 +524,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let controller = NetworkProtectionTunnelController() if await controller.isConnected { - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled) + DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled, withAdditionalParameters: [ + "reason": "thank-you-dialog" + ]) } await controller.stop() diff --git a/DuckDuckGo/MainViewController.swift b/DuckDuckGo/MainViewController.swift index 4f555e1323..92c0277371 100644 --- a/DuckDuckGo/MainViewController.swift +++ b/DuckDuckGo/MainViewController.swift @@ -1420,6 +1420,7 @@ class MainViewController: UIViewController { @objc private func onNetworkProtectionAccountSignIn(_ notification: Notification) { tunnelDefaults.resetEntitlementMessaging() + tunnelDefaults.vpnEarlyAccessOverAlertAlreadyShown = true os_log("[NetP Subscription] Reset expired entitlement messaging", log: .networkProtection, type: .info) } @@ -1435,7 +1436,9 @@ class MainViewController: UIViewController { } if await controller.isConnected { - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled) + DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled, withAdditionalParameters: [ + "reason": "entitlement-change" + ]) } await controller.stop() @@ -1449,7 +1452,9 @@ class MainViewController: UIViewController { let controller = NetworkProtectionTunnelController() if await controller.isConnected { - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled) + DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled, withAdditionalParameters: [ + "reason": "account-signed-out" + ]) } await controller.stop()