Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove VPN test rollout pixel #3510

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14777,8 +14777,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 203.1.0;
branch = "sam/remove-test-rollout-pixel";
kind = branch;
};
};
9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "19f1e5c945aa92562ad2d087e8d6c99801edf656",
"version" : "203.1.0"
"branch" : "sam/remove-test-rollout-pixel",
"revision" : "40b7a3763ed74ab080d5a9480e2e5a3512e75408"
}
},
{
Expand Down
1 change: 0 additions & 1 deletion DuckDuckGo/DBP/DataBrokerProtectionPixelsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public class DataBrokerProtectionPixelsHandler: EventMapping<DataBrokerProtectio
.dataBrokerMetricsWeeklyStats,
.dataBrokerMetricsMonthlyStats,
.invalidPayload,
.pixelTest,
.customDataBrokerStatsOptoutSubmit,
.customGlobalStatsOptoutSubmit,
.weeklyChildBrokerOrphanedOptOuts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 {

case networkProtectionConfigurationInvalidPayload(configuration: Configuration)
case networkProtectionConfigurationErrorLoadingCachedConfig(_ error: Error)
case networkProtectionConfigurationPixelTest
case networkProtectionConfigurationFailedToParse(_ error: Error)

case networkProtectionMalformedErrorDetected(_ error: Error)
Expand Down Expand Up @@ -344,9 +343,6 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 {
case .networkProtectionConfigurationErrorLoadingCachedConfig:
return "netp_ev_configuration_error_loading_cached_config"

case .networkProtectionConfigurationPixelTest:
return "netp_ev_configuration_pixel_test"

case .networkProtectionConfigurationFailedToParse:
return "netp_ev_configuration_failed_to_parse"

Expand Down Expand Up @@ -471,7 +467,6 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 {
.networkProtectionDNSUpdateCustom,
.networkProtectionDNSUpdateDefault,
.networkProtectionConfigurationInvalidPayload,
.networkProtectionConfigurationPixelTest,
.networkProtectionMalformedErrorDetected:
return nil
}
Expand Down Expand Up @@ -555,8 +550,7 @@ enum NetworkProtectionPixelEvent: PixelKitEventV2 {
.networkProtectionServerMigrationSuccess,
.networkProtectionDNSUpdateCustom,
.networkProtectionDNSUpdateDefault,
.networkProtectionConfigurationInvalidPayload,
.networkProtectionConfigurationPixelTest:
.networkProtectionConfigurationInvalidPayload:
return nil
}
}
Expand Down
14 changes: 0 additions & 14 deletions DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {
private let configurationStore = ConfigurationStore()
private let configurationManager: ConfigurationManager
private let privacyConfigurationManager = VPNPrivacyConfigurationManager()
private var configurationSubscription: AnyCancellable?

public init(accountManager: AccountManager,
accessTokenStorage: SubscriptionTokenKeychainStorage,
Expand Down Expand Up @@ -386,11 +385,6 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {

setUpSubscriptionMonitoring()

configurationSubscription = privacyConfigurationManager.updatesPublisher
.sink { [weak self] in
self?.firePrivacyConfigTestPixelIfNecessary()
}

if launchedOnStartup {
Task {
let isConnected = await tunnelController.isConnected
Expand Down Expand Up @@ -427,8 +421,6 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {
private func setUpSubscriptionMonitoring() {
guard accountManager.isUserAuthenticated else { return }

self.firePrivacyConfigTestPixelIfNecessary()

let entitlementsCheck = {
await self.accountManager.hasEntitlement(forProductName: .networkProtection, cachePolicy: .reloadIgnoringLocalCacheData)
}
Expand Down Expand Up @@ -456,12 +448,6 @@ final class DuckDuckGoVPNAppDelegate: NSObject, NSApplicationDelegate {
}
}

private func firePrivacyConfigTestPixelIfNecessary() {
if privacyConfigurationManager.privacyConfig.isSubfeatureEnabled(BackgroundAgentPixelTestSubfeature.pixelTest) {
PixelKit.fire(NetworkProtectionPixelEvent.networkProtectionConfigurationPixelTest, frequency: .daily)
}
}

}

extension DuckDuckGoVPNAppDelegate: AccountManagerKeychainAccessDelegate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ public enum DataBrokerProtectionPixels {
// Configuration
case invalidPayload(Configuration)
case errorLoadingCachedConfig(Error)
case pixelTest
case failedToParsePrivacyConfig(Error)

// Measure success/failure rate of Personal Information Removal Pixels
Expand Down Expand Up @@ -337,7 +336,6 @@ extension DataBrokerProtectionPixels: PixelKitEvent {
// Configuration
case .invalidPayload(let configuration): return "m_mac_dbp_\(configuration.rawValue)_invalid_payload".lowercased()
case .errorLoadingCachedConfig: return "m_mac_dbp_configuration_error_loading_cached_config"
case .pixelTest: return "m_mac_dbp_configuration_pixel_test"
case .failedToParsePrivacyConfig: return "m_mac_dbp_configuration_failed_to_parse"

// Various monitoring pixels
Expand Down Expand Up @@ -453,7 +451,6 @@ extension DataBrokerProtectionPixels: PixelKitEvent {
.secureVaultKeyStoreUpdateError,
.secureVaultError,
.invalidPayload,
.pixelTest,
.failedToParsePrivacyConfig:
return [:]
case .ipcServerProfileSavedCalledByApp,
Expand Down Expand Up @@ -614,7 +611,6 @@ public class DataBrokerProtectionPixelsHandler: EventMapping<DataBrokerProtectio
.dataBrokerMetricsWeeklyStats,
.dataBrokerMetricsMonthlyStats,
.invalidPayload,
.pixelTest,
.customDataBrokerStatsOptoutSubmit,
.customGlobalStatsOptoutSubmit,
.weeklyChildBrokerOrphanedOptOuts:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ public final class DataBrokerProtectionAgentManager {

private var didStartActivityScheduler = false

private var configurationSubscription: AnyCancellable?

init(userNotificationService: DataBrokerProtectionUserNotificationService,
activityScheduler: DataBrokerProtectionBackgroundActivityScheduler,
ipcServer: DataBrokerProtectionIPCServer,
Expand Down Expand Up @@ -187,13 +185,6 @@ public final class DataBrokerProtectionAgentManager {
/// Monitors entitlement changes every 60 minutes to optimize system performance and resource utilization by avoiding unnecessary operations when entitlement is invalid.
/// While keeping the agent active with invalid entitlement has no significant risk, setting the monitoring interval at 60 minutes is a good balance to minimize backend checks.
agentStopper.monitorEntitlementAndStopAgentIfEntitlementIsInvalidAndUserIsNotFreemium(interval: .minutes(60))

configurationSubscription = privacyConfigurationManager.updatesPublisher
.sink { [weak self] _ in
if self?.privacyConfigurationManager.privacyConfig.isSubfeatureEnabled(BackgroundAgentPixelTestSubfeature.pixelTest) ?? false {
PixelKit.fire(DataBrokerProtectionPixels.pixelTest, frequency: .daily)
}
}
}
}
}
Expand Down
Loading