Skip to content

Commit

Permalink
Merge release/1.96.0 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
daxmobile authored Jul 12, 2024
2 parents c88f5d3 + 3ddb160 commit fb600d6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Configuration/BuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 219
CURRENT_PROJECT_VERSION = 220
3 changes: 1 addition & 2 deletions DuckDuckGo/Application/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,10 @@ final class AppDelegate: NSObject, NSApplicationDelegate {
_ = DownloadListCoordinator.shared
_ = RecentlyClosedCoordinator.shared

PixelExperiment.install()

if LocalStatisticsStore().atb == nil {
AppDelegate.firstLaunchDate = Date()
// MARK: Enable pixel experiments here
PixelExperiment.install()
}
AtbAndVariantCleanup.cleanup()
DefaultVariantManager().assignVariantIfNeeded { _ in
Expand Down
3 changes: 1 addition & 2 deletions DuckDuckGo/Statistics/Experiment/PixelExperiment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ final internal class PixelExperimentLogic {
}

func fireSerpPixel() {
guard allocatedCohort != nil, let cohort else { return }
PixelKit.fire(GeneralPixel.serp(cohort: cohort.rawValue), frequency: .standard, includeAppVersionParameter: false)
PixelKit.fire(GeneralPixel.serp(cohort: cohort?.rawValue), frequency: .standard, includeAppVersionParameter: false)
}

func fireOnboardingHomeButtonEnabledPixel() {
Expand Down
3 changes: 2 additions & 1 deletion DuckDuckGo/Statistics/GeneralPixel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum GeneralPixel: PixelKitEventV2 {
case compileRulesWait(onboardingShown: OnboardingShown, waitTime: CompileRulesWaitTime, result: WaitResult)
case launchInitial(cohort: String)

case serp(cohort: String)
case serp(cohort: String?)
case serpInitial(cohort: String)
case serpDay21to27(cohort: String)

Expand Down Expand Up @@ -1043,6 +1043,7 @@ enum GeneralPixel: PixelKitEventV2 {
return [PixelKit.Parameters.experimentCohort: cohort]

case .serp(let cohort):
guard let cohort else { return [:] }
return [PixelKit.Parameters.experimentCohort: cohort]

case .serpInitial(let cohort):
Expand Down

0 comments on commit fb600d6

Please sign in to comment.