-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "day zero" experiment feature & metrics #22195
Conversation
Will change base to |
@@ -31,6 +31,6 @@ public abstract class BraveFeatureList { | |||
public static final String AI_CHAT = "AIChat"; | |||
public static final String BRAVE_SHOW_STRICT_FINGERPRINTING_MODE = | |||
"BraveShowStrictFingerprintingMode"; | |||
public static final String BRAVE_ZERO_DAY_FLAG_ANDROID = "BraveZeroDayFlagAndroid"; | |||
public static final String BRAVE_DAY_ZERO_EXPERIMENT = "BraveDayZeroExperiment"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DJAndries the BRAVE_DAY_ZERO_EXPERIMENT
variable is the same variable cross platforms and as a replacement for the previous Android-specific one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, correct
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_WIN) | ||
void GeneralBrowserUsage::ReportInstallTime() { | ||
int days_since_install = (base::Time::Now() - first_run_time_).InDays(); | ||
if (days_since_install < 0 || days_since_install > 30) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DJAndries this condition is to just keep the histogram putting users into 0-30 day buckets and anyone outside of this range, gets returned to the previous function, right? e.g. negative or >=31 will not be included.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's right. users outside of the 0-30 day range will not report either metric.
@DJAndries If and when we want to bring this idea to Mac, will any of this approach work on Mac? |
Yes, once we add support for loading variations upon first run for Mac, it will work. We'll just need to make a couple tweaks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chromium_src
++
b0ff7c6
to
b5cc650
Compare
f80c790
to
7d564d6
Compare
d9b634d
to
a242dfd
Compare
Resolves brave/brave-browser#36243
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Only test for Windows and Android.
--enable-features="BraveDayZeroExperiment:variant/a"
. EnsureBrave.DayZero.A.InstallTime
has value of 0.--enable-features="BraveDayZeroExperiment:variant/b"
, ensure metric has value of 21, andBrave.DayZero.B.InstallTime
does NOT exist--enable-features="BraveDayZeroExperiment:variant/b"
switchBrave.DayZero.B.InstallTime
has a value of 0.--enable-features="BraveDayZeroExperiment:variant/b"
, ensure metric has value of 21, andBrave.DayZero.A.InstallTime
does NOT existEnsure the metrics only exist in the
logs_constellation_prep_express
pref.