Skip to content

Commit

Permalink
Sabrina/check allocated cohort (#2973)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1199230911884351/1207799610561089/f

**Description**: Check the cohort has been allocated before trying to
access it
  • Loading branch information
SabrinaTardio authored Jul 12, 2024
1 parent 3ddb160 commit 7be953f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion DuckDuckGo/Statistics/Experiment/PixelExperiment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ final internal class PixelExperimentLogic {
}

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

func fireOnboardingHomeButtonEnabledPixel() {
Expand Down

0 comments on commit 7be953f

Please sign in to comment.