Skip to content

Commit

Permalink
Remove VPN launch pixels.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Jun 8, 2024
1 parent 18812c9 commit d3a00af
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 38 deletions.
8 changes: 0 additions & 8 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,6 @@ extension Pixel {
case privacyProSubscriptionManagementEmail
case privacyProSubscriptionManagementPlanBilling
case privacyProSubscriptionManagementRemoval
case privacyProFeatureEnabled
case privacyProVPNAccessRevokedDialogShown
case privacyProVPNBetaStoppedWhenPrivacyProEnabled
case privacyProTransactionProgressNotHiddenAfter60s
case privacyProSuccessfulSubscriptionAttribution

Expand Down Expand Up @@ -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"
Expand Down
17 changes: 0 additions & 17 deletions DuckDuckGo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -470,7 +469,6 @@ import WebKit
StatisticsLoader.shared.load {
StatisticsLoader.shared.refreshAppRetentionAtb()
self.fireAppLaunchPixel()
self.firePrivacyProFeatureEnabledPixel()
self.reportAdAttribution()
}

Expand Down Expand Up @@ -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()
}
Expand Down Expand Up @@ -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 {
Expand Down
13 changes: 0 additions & 13 deletions DuckDuckGo/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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()
}
Expand All @@ -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()
}
Expand Down

0 comments on commit d3a00af

Please sign in to comment.