Skip to content

Commit

Permalink
Remove VPN launch pixels (#2845)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1203137811378537/1206905458729874/f
Tech Design URL:
CC:

**Description**:

This PR removes VPN launch pixels.
  • Loading branch information
samsymons authored Jun 10, 2024
1 parent 8bf88df commit cfb6fe1
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 146 deletions.
5 changes: 0 additions & 5 deletions DuckDuckGo/Menus/MainMenuActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -794,11 +794,6 @@ extension MainViewController {
Application.appDelegate.subscriptionManager.accountManager.signOut()
resetThankYouModalChecks(nil)
UserDefaults.netP.networkProtectionEntitlementsExpired = false

// Clear pixel data
PixelKit.shared?.clearFrequencyHistoryFor(pixel: PrivacyProPixel.privacyProFeatureEnabled)
PixelKit.shared?.clearFrequencyHistoryFor(pixel: PrivacyProPixel.privacyProBetaUserThankYouDBP)
PixelKit.shared?.clearFrequencyHistoryFor(pixel: PrivacyProPixel.privacyProBetaUserThankYouVPN)
}

@objc func resetDailyPixels(_ sender: Any?) {
Expand Down
7 changes: 0 additions & 7 deletions DuckDuckGo/Statistics/PrivacyProPixel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ fileprivate let appDistribution = "direct"

enum PrivacyProPixel: PixelKitEventV2 {
// Subscription
case privacyProFeatureEnabled
case privacyProBetaUserThankYouVPN
case privacyProBetaUserThankYouDBP
case privacyProSubscriptionActive
case privacyProOfferScreenImpression
case privacyProPurchaseAttempt
Expand Down Expand Up @@ -74,10 +71,6 @@ enum PrivacyProPixel: PixelKitEventV2 {

var name: String {
switch self {
case .privacyProFeatureEnabled: return
"m_mac_\(appDistribution)_privacy-pro_feature_enabled"
case .privacyProBetaUserThankYouVPN: return "m_mac_\(appDistribution)_privacy-pro_promotion-dialog_shown_vpn"
case .privacyProBetaUserThankYouDBP: return "m_mac_\(appDistribution)_privacy-pro_promotion-dialog_shown_dbp"
case .privacyProSubscriptionActive: return "m_mac_\(appDistribution)_privacy-pro_app_subscription_active"
case .privacyProOfferScreenImpression: return "m_mac_\(appDistribution)_privacy-pro_offer_screen_impression"
case .privacyProPurchaseAttempt: return "m_mac_\(appDistribution)_privacy-pro_terms-conditions_subscribe_click"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,12 @@ final class WaitlistThankYouPromptPresenter {
// If the user tested both, the PIR prompt will be displayed.
@MainActor
func presentThankYouPromptIfNecessary(in window: NSWindow) {
// Wiring this here since it's mostly useful for rolling out PrivacyPro, and should
// go away once PPro is fully rolled out.
if DefaultSubscriptionFeatureAvailability().isFeatureAvailable {
PixelKit.fire(PrivacyProPixel.privacyProFeatureEnabled, frequency: .daily)
}

guard canShowPromptCheck() else {
return
}

if isPIRBetaTester() {
saveDidShowPromptCheck()
PixelKit.fire(PrivacyProPixel.privacyProBetaUserThankYouDBP, frequency: .dailyAndCount)
presentPIRThankYouPrompt(in: window)
}
}
Expand Down
1 change: 0 additions & 1 deletion DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {
UserDefaults.netP.networkProtectionEntitlementsExpired = false
case .invalidEntitlement:
UserDefaults.netP.networkProtectionEntitlementsExpired = true
PixelKit.fire(VPNPrivacyProPixel.vpnAccessRevokedDialogShown, frequency: .dailyAndCount)

guard let self else { return }
Task {
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit cfb6fe1

Please sign in to comment.