From d3a00af8174b57e1d619aa6b3a9e01588220475f Mon Sep 17 00:00:00 2001 From: Sam Symons Date: Fri, 7 Jun 2024 19:36:03 -0700 Subject: [PATCH] Remove VPN launch pixels. --- Core/PixelEvent.swift | 8 -------- DuckDuckGo/AppDelegate.swift | 17 ----------------- DuckDuckGo/MainViewController.swift | 13 ------------- 3 files changed, 38 deletions(-) diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index f2f9bd6041..a67a0f889d 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -648,9 +648,6 @@ extension Pixel { case privacyProSubscriptionManagementEmail case privacyProSubscriptionManagementPlanBilling case privacyProSubscriptionManagementRemoval - case privacyProFeatureEnabled - case privacyProVPNAccessRevokedDialogShown - case privacyProVPNBetaStoppedWhenPrivacyProEnabled case privacyProTransactionProgressNotHiddenAfter60s case privacyProSuccessfulSubscriptionAttribution @@ -1382,11 +1379,6 @@ extension Pixel.Event { case .settingsShowFullSiteAddressEnabled: return "m_settings_show_full_url_on" case .settingsShowFullSiteAddressDisabled: return "m_settings_show_full_url_off" - // Launch - case .privacyProFeatureEnabled: return "m_privacy-pro_feature_enabled" - case .privacyProVPNAccessRevokedDialogShown: return "m_privacy-pro_vpn-access-revoked-dialog_shown" - case .privacyProVPNBetaStoppedWhenPrivacyProEnabled: return "m_privacy-pro_vpn-beta-stopped-when-privacy-pro-enabled" - // Web case .privacyProOfferMonthlyPriceClick: return "m_privacy-pro_offer_monthly-price_click" case .privacyProOfferYearlyPriceClick: return "m_privacy-pro_offer_yearly-price_click" diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index 1dec71b7f2..858710e385 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -413,7 +413,6 @@ import WebKit self?.mainViewController?.segueToPrivacyPro() } window?.rootViewController?.present(alertController, animated: true) { [weak self] in - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNAccessRevokedDialogShown) self?.tunnelDefaults.showEntitlementAlert = false } } @@ -470,7 +469,6 @@ import WebKit StatisticsLoader.shared.load { StatisticsLoader.shared.refreshAppRetentionAtb() self.fireAppLaunchPixel() - self.firePrivacyProFeatureEnabledPixel() self.reportAdAttribution() } @@ -541,11 +539,6 @@ import WebKit let isConnected = await AppDependencyProvider.shared.networkProtectionTunnelController.isConnected - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled, withAdditionalParameters: [ - "reason": reason, - "vpn-connected": String(isConnected) - ]) - await AppDependencyProvider.shared.networkProtectionTunnelController.stop() await AppDependencyProvider.shared.networkProtectionTunnelController.removeVPN() } @@ -603,16 +596,6 @@ import WebKit } } - private func firePrivacyProFeatureEnabledPixel() { - let subscriptionFeatureAvailability = AppDependencyProvider.shared.subscriptionFeatureAvailability - guard subscriptionFeatureAvailability.isFeatureAvailable, - subscriptionFeatureAvailability.isSubscriptionPurchaseAllowed else { - return - } - - DailyPixel.fire(pixel: .privacyProFeatureEnabled) - } - private func fireFailedCompilationsPixelIfNeeded() { let store = FailedCompilationsStore() if store.hasAnyFailures { diff --git a/DuckDuckGo/MainViewController.swift b/DuckDuckGo/MainViewController.swift index 9cd8139b95..7e4b0526b9 100644 --- a/DuckDuckGo/MainViewController.swift +++ b/DuckDuckGo/MainViewController.swift @@ -1455,7 +1455,6 @@ class MainViewController: UIViewController { } dismiss(animated: true) { self.present(alertController, animated: true, completion: nil) - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNAccessRevokedDialogShown) self.tunnelDefaults.showEntitlementAlert = false } } @@ -1489,12 +1488,6 @@ class MainViewController: UIViewController { tunnelDefaults.enableEntitlementMessaging() } - if await networkProtectionTunnelController.isConnected { - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled, withAdditionalParameters: [ - "reason": "entitlement-change" - ]) - } - await networkProtectionTunnelController.stop() await networkProtectionTunnelController.removeVPN() } @@ -1503,12 +1496,6 @@ class MainViewController: UIViewController { @objc private func onNetworkProtectionAccountSignOut(_ notification: Notification) { Task { - if await networkProtectionTunnelController.isConnected { - DailyPixel.fireDailyAndCount(pixel: .privacyProVPNBetaStoppedWhenPrivacyProEnabled, withAdditionalParameters: [ - "reason": "account-signed-out" - ]) - } - await networkProtectionTunnelController.stop() await networkProtectionTunnelController.removeVPN() }