diff --git a/DuckDuckGo/Menus/MainMenuActions.swift b/DuckDuckGo/Menus/MainMenuActions.swift index 898f51ea74..25fcc148fc 100644 --- a/DuckDuckGo/Menus/MainMenuActions.swift +++ b/DuckDuckGo/Menus/MainMenuActions.swift @@ -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?) { diff --git a/DuckDuckGo/Statistics/PrivacyProPixel.swift b/DuckDuckGo/Statistics/PrivacyProPixel.swift index a4093228f6..5c2456afbf 100644 --- a/DuckDuckGo/Statistics/PrivacyProPixel.swift +++ b/DuckDuckGo/Statistics/PrivacyProPixel.swift @@ -29,9 +29,6 @@ fileprivate let appDistribution = "direct" enum PrivacyProPixel: PixelKitEventV2 { // Subscription - case privacyProFeatureEnabled - case privacyProBetaUserThankYouVPN - case privacyProBetaUserThankYouDBP case privacyProSubscriptionActive case privacyProOfferScreenImpression case privacyProPurchaseAttempt @@ -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" diff --git a/DuckDuckGo/Waitlist/Views/WaitlistThankYouPromptPresenter.swift b/DuckDuckGo/Waitlist/Views/WaitlistThankYouPromptPresenter.swift index 11281dcaba..75af13e0a9 100644 --- a/DuckDuckGo/Waitlist/Views/WaitlistThankYouPromptPresenter.swift +++ b/DuckDuckGo/Waitlist/Views/WaitlistThankYouPromptPresenter.swift @@ -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) } } diff --git a/DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift b/DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift index 1b5a361051..b80094a934 100644 --- a/DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift +++ b/DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift @@ -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 { diff --git a/LocalPackages/NetworkProtectionMac/Sources/NetworkProtectionUI/Pixels/VPNPrivacyProPixel.swift b/LocalPackages/NetworkProtectionMac/Sources/NetworkProtectionUI/Pixels/VPNPrivacyProPixel.swift deleted file mode 100644 index 2bbbf3a464..0000000000 --- a/LocalPackages/NetworkProtectionMac/Sources/NetworkProtectionUI/Pixels/VPNPrivacyProPixel.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// VPNPrivacyProPixel.swift -// -// Copyright © 2024 DuckDuckGo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import Foundation -import PixelKit - -/// PrivacyPro pixels. -/// -/// Ref: https://app.asana.com/0/0/1206836019887720/f -/// -public enum VPNPrivacyProPixel: PixelKitEventV2 { - - /// Fired when PrivacyPro VPN access is revoked, and the dialog is shown. - /// - case vpnAccessRevokedDialogShown - - /// Fired only once when the VPN beta becomes disabled due to the start of PrivacyPro.. - /// - case vpnBetaStoppedWhenPrivacyProEnabled - - public var name: String { - switch self { - case .vpnAccessRevokedDialogShown: - return "vpn_access_revoked_dialog_shown" - case .vpnBetaStoppedWhenPrivacyProEnabled: - return "vpn_beta_stopped_when_privacy_pro_enabled" - } - } - - public var error: Error? { - nil - } - - public var parameters: [String: String]? { - nil - } -} diff --git a/LocalPackages/NetworkProtectionMac/Tests/NetworkProtectionUITests/Pixels/VPNPrivacyProPixelTests.swift b/LocalPackages/NetworkProtectionMac/Tests/NetworkProtectionUITests/Pixels/VPNPrivacyProPixelTests.swift deleted file mode 100644 index 21d5472f49..0000000000 --- a/LocalPackages/NetworkProtectionMac/Tests/NetworkProtectionUITests/Pixels/VPNPrivacyProPixelTests.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// VPNPrivacyProPixelTests.swift -// -// Copyright © 2024 DuckDuckGo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import PixelKit -import PixelKitTestingUtilities -import XCTest -@testable import NetworkProtectionUI - -final class VPNPrivacyProPixelTests: XCTestCase { - - private enum TestError: CustomNSError { - case testError - case underlyingError - - /// The domain of the error. - static var errorDomain: String { - "testDomain" - } - - /// The error code within the given domain. - var errorCode: Int { - switch self { - case .testError: return 1 - case .underlyingError: return 2 - } - } - - /// The user-info dictionary. - var errorUserInfo: [String: Any] { - switch self { - case .testError: - return [NSUnderlyingErrorKey: TestError.underlyingError] - case .underlyingError: - return [:] - } - } - } - - // MARK: - Test Firing Pixels - - /// This test verifies validates expectations when firing `VPNPrivacyProPixel`. - /// - /// This test verifies a few different things: - /// - That the pixel name is not changed by mistake. - /// - That when the pixel is fired its name and parameters are exactly what's expected. - /// - func testVPNPixelFireExpectations() { - fire(VPNPrivacyProPixel.vpnAccessRevokedDialogShown, - frequency: .dailyAndCount, - and: .expect(pixelName: "m_mac_vpn_access_revoked_dialog_shown"), - file: #filePath, - line: #line) - fire(VPNPrivacyProPixel.vpnBetaStoppedWhenPrivacyProEnabled, - frequency: .dailyAndCount, - and: .expect(pixelName: "m_mac_vpn_beta_stopped_when_privacy_pro_enabled"), - file: #filePath, - line: #line) - } -}