Skip to content

Commit

Permalink
Merge branch 'main' into sam/vpn-reddit-cookie-workaround
Browse files Browse the repository at this point in the history
* main:
  BSK to 156.0.0, add stub for CTL (#2955)
  Update translations (#2954)
  Improve Mobile Site Breakage Report Quality (#2926)
  Release 7.124.0-1 (#2953)
  Add additional RMF attributes (#2949)
  Update autoconsent to v10.10.0 (#2930)
  Settings navigation issue fixed (#2951)
  Handle is_nav flag in ac suggestions (#2944)
  Update Secure Vault init (#2916)
  Fast egress server draining (#2945)
  Revert to the previous label as changes on SERP have been reverted (#2948)
  pixel tweaks (#2946)
  Trigger authentication as Passwords screen is being presented (#2921)
  Kingfisher updated from 7.11.0. to 7.12.0 (#2941)
  Update settings e2e tests (#2940)
  Remove VPN launch pixels (#2934)
  Clean up VPN waitlist debug screen and copy (#2936)
  Remove nightly CodeQL scans (#2937)
  Release 7.124.0-0 (#2939)
  • Loading branch information
samsymons committed Jun 14, 2024
2 parents 09d0af6 + 3e26f37 commit c5035e3
Show file tree
Hide file tree
Showing 85 changed files with 1,248 additions and 552 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/codeql.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 7.123.0
MARKETING_VERSION = 7.124.0
4 changes: 2 additions & 2 deletions Core/AppPrivacyConfigurationDataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import BrowserServicesKit
final public class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider {

public struct Constants {
public static let embeddedDataETag = "\"36c78de66c85602ab5f7b27b5dc5fa3c\""
public static let embeddedDataSHA = "4983dd4691181b5285887b10dffe2f8fa7a0a4328b47ddf66019e55bc5485d4b"
public static let embeddedDataETag = "\"24b0fb60a4b541395e39707ff21d1395\""
public static let embeddedDataSHA = "60329154c65a74fbf0a6a0ba20b9c3f3cf14b0057ee29f659e34aa542ec5584d"
}

public var embeddedDataEtag: String {
Expand Down
9 changes: 0 additions & 9 deletions Core/AppURLs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ public extension URL {

static func makeExtiURL(atb: String) -> URL { URL.exti.appendingParameter(name: Param.atb, value: atb) }

static func makeAutocompleteURL(for text: String) throws -> URL {
URL.autocomplete.appendingParameters([
Param.search: text,
Param.enableNavSuggestions: ParamValue.enableNavSuggestions
])
}

static func isDuckDuckGo(domain: String?) -> Bool {
guard let domain = domain, let url = URL(string: "https://\(domain)") else { return false }
return url.isDuckDuckGo
Expand Down Expand Up @@ -120,7 +113,6 @@ public extension URL {
static let vertical = "ia"
static let verticalRewrite = "iar"
static let verticalMaps = "iaxm"
static let enableNavSuggestions = "is_nav"
static let email = "email"

}
Expand All @@ -130,7 +122,6 @@ public extension URL {
static let source = "ddg_ios"
static let appUsage = "app_use"
static let searchHeader = "-1"
static let enableNavSuggestions = "1"
static let emailEnabled = "1"
static let emailDisabled = "0"
static let majorVerticals: Set<String> = ["images", "videos", "news"]
Expand Down
68 changes: 53 additions & 15 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ extension Pixel {
case autofillOnboardedUser
case autofillLoginsStacked

case autofillMultipleAuthCallsTriggered

case getDesktopCopy
case getDesktopShare

Expand Down Expand Up @@ -319,7 +321,11 @@ extension Pixel {
case networkProtectionEnableAttemptConnecting
case networkProtectionEnableAttemptSuccess
case networkProtectionEnableAttemptFailure


case networkProtectionServerMigrationAttempt
case networkProtectionServerMigrationAttemptSuccess
case networkProtectionServerMigrationAttemptFailure

case networkProtectionTunnelFailureDetected
case networkProtectionTunnelFailureRecovered

Expand All @@ -342,6 +348,8 @@ extension Pixel {

case networkProtectionClientFailedToFetchServerList
case networkProtectionClientFailedToParseServerListResponse
case networkProtectionClientFailedToFetchServerStatus
case networkProtectionClientFailedToParseServerStatusResponse
case networkProtectionClientFailedToEncodeRegisterKeyRequest
case networkProtectionClientFailedToFetchRegisteredServers
case networkProtectionClientFailedToParseRegisteredServersResponse
Expand Down Expand Up @@ -559,8 +567,6 @@ extension Pixel {

case syncWrongEnvironment

case swipeTabsUsed
case swipeTabsIncorrectScrollState
case swipeTabsUsedDaily
case swipeToOpenNewTab

Expand Down Expand Up @@ -648,9 +654,6 @@ extension Pixel {
case privacyProSubscriptionManagementEmail
case privacyProSubscriptionManagementPlanBilling
case privacyProSubscriptionManagementRemoval
case privacyProFeatureEnabled
case privacyProVPNAccessRevokedDialogShown
case privacyProVPNBetaStoppedWhenPrivacyProEnabled
case privacyProTransactionProgressNotHiddenAfter60s
case privacyProSuccessfulSubscriptionAttribution

Expand All @@ -673,6 +676,8 @@ extension Pixel {
case settingsGeneralOpen
case settingsAutocompleteOn
case settingsAutocompleteOff
case settingsRecentlyVisitedOn
case settingsRecentlyVisitedOff
case settingsGeneralAutocompleteOn
case settingsGeneralAutocompleteOff
case settingsGeneralVoiceSearchOn
Expand All @@ -699,6 +704,12 @@ extension Pixel {
case settingsShowFullSiteAddressEnabled
case settingsShowFullSiteAddressDisabled

// Other settings
case settingsKeyboardOnNewTabOn
case settingsKeyboardOnNewTabOff
case settingsKeyboardOnAppLaunchOn
case settingsKeyboardOnAppLaunchOff

// Web pixels
case privacyProOfferMonthlyPriceClick
case privacyProOfferYearlyPriceClick
Expand All @@ -713,6 +724,15 @@ extension Pixel {
case secureVaultL2KeyMigration
case secureVaultL2KeyPasswordMigration

// MARK: Experimental report broken site flows
case reportBrokenSiteShown
case reportBrokenSiteBreakageCategorySelected
case reportBrokenSiteSent
case reportBrokenSiteOverallCategorySelected
case reportBrokenSiteFeedbackCategorySubmitted
case reportBrokenSiteTogglePromptNo
case reportBrokenSiteTogglePromptYes

}

}
Expand Down Expand Up @@ -762,6 +782,11 @@ extension Pixel.Event {
case .settingsAutoconsentOn: return "m_settings_autoconsent_on"
case .settingsAutoconsentOff: return "m_settings_autoconsent_off"

case .settingsKeyboardOnNewTabOn: return "m_settings_keyboard_on-new-tab_on"
case .settingsKeyboardOnNewTabOff: return "m_settings_keyboard_on-new-tab_off"
case .settingsKeyboardOnAppLaunchOn: return "m_settings_keyboard_on-app-launch_on"
case .settingsKeyboardOnAppLaunchOff: return "m_settings_keyboard_on-app-launch_off"

case .browsingMenuOpened: return "mb"
case .browsingMenuNewTab: return "mb_tb"
case .browsingMenuAddToBookmarks: return "mb_abk"
Expand Down Expand Up @@ -968,6 +993,8 @@ extension Pixel.Event {
case .autofillOnboardedUser: return "m_autofill_onboardeduser"
case .autofillLoginsStacked: return "m_autofill_logins_stacked"

case .autofillMultipleAuthCallsTriggered: return "m_autofill_multiple_auth_calls_triggered"

case .getDesktopCopy: return "m_get_desktop_copy"
case .getDesktopShare: return "m_get_desktop_share"

Expand Down Expand Up @@ -1067,7 +1094,14 @@ extension Pixel.Event {
case .networkProtectionGeoswitchingSetNearest: return "m_netp_ev_geoswitching_set_nearest"
case .networkProtectionGeoswitchingSetCustom: return "m_netp_ev_geoswitching_set_custom"
case .networkProtectionGeoswitchingNoLocations: return "m_netp_ev_geoswitching_no_locations"


case .networkProtectionClientFailedToFetchServerStatus: return "m_netp_server_migration_failed_to_fetch_status"
case .networkProtectionClientFailedToParseServerStatusResponse: return "m_netp_server_migration_failed_to_parse_response"

case .networkProtectionServerMigrationAttempt: return "m_netp_ev_server_migration_attempt"
case .networkProtectionServerMigrationAttemptSuccess: return "m_netp_ev_server_migration_attempt_success"
case .networkProtectionServerMigrationAttemptFailure: return "m_netp_ev_server_migration_attempt_failed"

// MARK: remote messaging pixels

case .remoteMessageShown: return "m_remote_message_shown"
Expand Down Expand Up @@ -1234,8 +1268,6 @@ extension Pixel.Event {

case .syncWrongEnvironment: return "m_d_sync_wrong_environment_u"

case .swipeTabsUsed: return "m_swipe-tabs-used"
case .swipeTabsIncorrectScrollState: return "m_swipe-tabs.incorrect-scrollview-state"
case .swipeTabsUsedDaily: return "m_swipe-tabs-used-daily"
case .swipeToOpenNewTab: return "m_addressbar_swipe_new_tab"

Expand Down Expand Up @@ -1356,6 +1388,8 @@ extension Pixel.Event {
case .settingsGeneralOpen: return "m_settings_general_open"
case .settingsAutocompleteOn: return "m_settings_autocomplete_on"
case .settingsAutocompleteOff: return "m_settings_autocomplete_off"
case .settingsRecentlyVisitedOn: return "m_settings_autocomplete_recently-visited_on"
case .settingsRecentlyVisitedOff: return "m_settings_autocomplete_recently-visited_off"
case .settingsGeneralAutocompleteOn: return "m_settings_general_autocomplete_on"
case .settingsGeneralAutocompleteOff: return "m_settings_general_autocomplete_off"
case .settingsGeneralVoiceSearchOn: return "m_settings_general_voice_search_on"
Expand All @@ -1382,11 +1416,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 All @@ -1402,10 +1431,19 @@ extension Pixel.Event {
case .networkProtectionWidgetDisconnectAttempt: return "m_netp_widget_disconnect_attempt"
case .networkProtectionWidgetDisconnectSuccess: return "m_netp_widget_disconnect_success"

// MARK: Secure Vault
// MARK: Secure Vault
case .secureVaultL1KeyMigration: return "m_secure-vault_keystore_event_l1-key-migration"
case .secureVaultL2KeyMigration: return "m_secure-vault_keystore_event_l2-key-migration"
case .secureVaultL2KeyPasswordMigration: return "m_secure-vault_keystore_event_l2-key-password-migration"

// MARK: Experimental report broken site flows
case .reportBrokenSiteShown: return "m_report-broken-site_shown"
case .reportBrokenSiteBreakageCategorySelected: return "m_report-broken-site_breakage-category-selected"
case .reportBrokenSiteSent: return "m_report-broken-site_sent"
case .reportBrokenSiteOverallCategorySelected: return "m_report-broken-site_overall-category-selected"
case .reportBrokenSiteFeedbackCategorySubmitted: return "m_report-broken-site_feedback-category-submitted"
case .reportBrokenSiteTogglePromptNo: return "m_report-broken-site_toggle-prompt-no"
case .reportBrokenSiteTogglePromptYes: return "m_report-broken-site_toggle-prompt-yes"
}
}
}
Expand Down
21 changes: 9 additions & 12 deletions Core/PixelExperiment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ public enum PixelExperiment: String, CaseIterable {
logic.cleanup()
}

// These are the variants. Rename or add/remove them as needed. If you change the string value
// remember to keep it clear for privacy triage.
// These are the experiment variants. If you need to change the string value,
// ensure it remains clear for privacy triage. Before making any changes,
// save your spot in the queue using this link:
// https://app.asana.com/0/1202500774821704/1207478569595510/f

case control
case newSettings
case breakageSiteReportingFlowA
case breakageSiteReportingFlowB

// Internal state for users not included in any variant
case noVariant
Expand Down Expand Up @@ -97,15 +101,8 @@ final internal class PixelExperimentLogic {
return cohort
}

let randomNumber = Int.random(in: 0..<100)

// Allocate user to a cohort based on the random number
let cohort: PixelExperiment
if randomNumber < 50 {
cohort = .control
} else {
cohort = .newSettings
}
let variants: [PixelExperiment] = [.control, .breakageSiteReportingFlowA, .breakageSiteReportingFlowB]
let cohort: PixelExperiment = variants[Int.random(in: variants.indices)]

// Store and use the selected cohort
allocatedCohort = cohort.rawValue
Expand Down
12 changes: 10 additions & 2 deletions Core/ios-config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"readme": "https://github.com/duckduckgo/privacy-configuration",
"version": 1717171433682,
"version": 1717679238533,
"features": {
"adClickAttribution": {
"readme": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/#3rd-party-tracker-loading-protection",
Expand Down Expand Up @@ -1963,6 +1963,14 @@
{
"selector": "#credential_picker_container",
"type": "override"
},
{
"selector": ".shop-display-ad",
"type": "hide-empty"
},
{
"selector": ".row.full-bleed-row",
"type": "hide-empty"
}
]
},
Expand Down Expand Up @@ -4431,7 +4439,7 @@
]
},
"state": "enabled",
"hash": "adc17fadc45c61f4a27fbf94b4980bdd"
"hash": "c51c06a39ff0d11c62ef9ea4f9fdcd88"
},
"exceptionHandler": {
"exceptions": [
Expand Down
Loading

0 comments on commit c5035e3

Please sign in to comment.