duckduckgo / macos-browser

DuckDuckGo macOS Browser
Apache License 2.0
232 stars 7 forks source link

Freemium DBP: Experiment Setup #3293

Closed aataraxiaa closed 17 hours ago

aataraxiaa commented 1 day ago

Task/Issue URL: https://app.asana.com/0/1206488453854252/1208052452067283/f Tech Design URL: CC:

Description: This PR:

  1. Creates the experiment manager for Freemium DBP and associated tests
  2. Assigns a cohort on app startup if the user is eligible
  3. Includes the cohort as a condition when deciding if Freemium DBP is available

How to Review this PR:

  1. Commit 1 is only cleanup pre-implementation
  2. Commit 2 & 3 is where to focus
  3. Commit 4 is just post-main-rebase fix

Testing Prerequisites:

  1. Make sure you are an internal user
  2. Disable/Signout of Privacy Pro (Settings menu -> PP -> Remove from this device)

Steps to test this PR:

  1. Launch browser
  2. Go to Debug menu -> Freemium -> Log All State
  3. Check the Xcode console and confirm the following experiment-related state is set (you will be in control as you are not US-based), e.g
FREEMIUM DBP: freemium.dbp.experiment.enrollment-date 2024-09-17 15:38:00 +0000
FREEMIUM DBP: freemium.dbp.experiment.cohort control

Definition of Done:

Internal references:

Pull Request Review Checklist Software Engineering Expectations Technical Design Template Pull Request Documentation

github-actions[bot] commented 1 day ago
Warnings
:warning: PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by :no_entry_sign: dangerJS against 46a93751d4c6901a038b371166a76edadf68908b