Skip to content

Commit

Permalink
Remove noisy PIR pixels (#3459)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1203581873609357/1207850832493111/f
Tech Design URL:
CC:

**Description**:
V simple, removes a couple of pixels that fired a lot and one user in
particular has not been happy about

**Steps to test this PR**:
1. Check PIR still works

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

**Definition of Done**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

---
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
  • Loading branch information
THISISDINOSAUR authored Oct 28, 2024
1 parent 319bb1f commit 4469572
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions DuckDuckGo/DBP/DataBrokerProtectionFeatureGatekeeper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,10 @@ private extension DefaultDataBrokerProtectionFeatureGatekeeper {

func firePrerequisitePixelsAndLogIfNecessary(hasEntitlements: Bool, isAuthenticatedResult: Bool) {
if !hasEntitlements {
pixelHandler.fire(.gatekeeperEntitlementsInvalid)
Logger.dataBrokerProtection.error("DBP feature Gatekeeper: Entitlement check failed")
}

if !isAuthenticatedResult {
pixelHandler.fire(.gatekeeperNotAuthenticated)
Logger.dataBrokerProtection.error("DBP feature Gatekeeper: Authentication check failed")
}
}
Expand Down
2 changes: 0 additions & 2 deletions DuckDuckGo/DBP/DataBrokerProtectionPixelsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ public class DataBrokerProtectionPixelsHandler: EventMapping<DataBrokerProtectio
.globalMetricsMonthlyStats,
.dataBrokerMetricsWeeklyStats,
.dataBrokerMetricsMonthlyStats,
.gatekeeperNotAuthenticated,
.gatekeeperEntitlementsInvalid,
.invalidPayload,
.pixelTest,
.customDataBrokerStatsOptoutSubmit,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ public enum DataBrokerProtectionPixels {
case dataBrokerMetricsWeeklyStats(dataBrokerURL: String, profilesFound: Int, optOutsInProgress: Int, successfulOptOuts: Int, failedOptOuts: Int, durationOfFirstOptOut: Int, numberOfNewRecordsFound: Int, numberOfReappereances: Int)
case dataBrokerMetricsMonthlyStats(dataBrokerURL: String, profilesFound: Int, optOutsInProgress: Int, successfulOptOuts: Int, failedOptOuts: Int, durationOfFirstOptOut: Int, numberOfNewRecordsFound: Int, numberOfReappereances: Int)

// Feature Gatekeeper
case gatekeeperNotAuthenticated
case gatekeeperEntitlementsInvalid

// Custom stats
case customDataBrokerStatsOptoutSubmit(dataBrokerName: String, optOutSubmitSuccessRate: Double)
case customGlobalStatsOptoutSubmit(optOutSubmitSuccessRate: Double)
Expand Down Expand Up @@ -338,10 +334,6 @@ extension DataBrokerProtectionPixels: PixelKitEvent {
case .dataBrokerMetricsWeeklyStats: return "m_mac_dbp_databroker_weekly_stats"
case .dataBrokerMetricsMonthlyStats: return "m_mac_dbp_databroker_monthly_stats"

// Feature Gatekeeper
case .gatekeeperNotAuthenticated: return "m_mac_dbp_gatekeeper_not_authenticated"
case .gatekeeperEntitlementsInvalid: return "m_mac_dbp_gatekeeper_entitlements_invalid"

// 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"
Expand Down Expand Up @@ -460,8 +452,6 @@ extension DataBrokerProtectionPixels: PixelKitEvent {
.secureVaultKeyStoreReadError,
.secureVaultKeyStoreUpdateError,
.secureVaultError,
.gatekeeperNotAuthenticated,
.gatekeeperEntitlementsInvalid,
.invalidPayload,
.pixelTest,
.failedToParsePrivacyConfig:
Expand Down Expand Up @@ -623,8 +613,6 @@ public class DataBrokerProtectionPixelsHandler: EventMapping<DataBrokerProtectio
.globalMetricsMonthlyStats,
.dataBrokerMetricsWeeklyStats,
.dataBrokerMetricsMonthlyStats,
.gatekeeperNotAuthenticated,
.gatekeeperEntitlementsInvalid,
.invalidPayload,
.pixelTest,
.customDataBrokerStatsOptoutSubmit,
Expand Down

0 comments on commit 4469572

Please sign in to comment.