-
Notifications
You must be signed in to change notification settings - Fork 202
feat(nimbus): Advanced targeting for users who have not accepted ToU yet, have not disabled ads, and are on Mac or Win #12596
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
base: main
Are you sure you want to change the base?
Conversation
71d6610
to
f0db0e3
Compare
@lmegviar Yep this looks right to me, you'll have to split that long line and then run |
@lmegviar : Will we need to update this advanced targeting when the ToU prefs are renamed in https://bugzilla.mozilla.org/show_bug.cgi?id=1964544? Can we make this advanced targeting future proof, checking both the old |
Updated to also include the new |
Hi @jaredlockhart - is the long line the description of the targeting expression itself? |
6dd030f
to
767a41e
Compare
@jaredlockhart I gave splitting up the description and expression a go, but am having some issues with |
Taking back to draft state as there are pending updates from product. I'll finalize the patch when we have the full requirements. |
Thanks for your patience, we confirmed the requirements this morning and I've updated the patch. This should be ready for review. |
@dmose to review for OMC team before landing |
&& | ||
'datareporting.policy.dataSubmissionPolicyAcceptedVersion'|preferenceValue >= 2 | ||
&& | ||
'datareporting.policy.dataSubmissionPolicyNotifiedTime'|preferenceValue >= "1747843698000" |
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.
Date of TOS being enabled by default with release of Fx139
We have some new product requirements, I'll update today and take back out of draft when those are in place. |
@mikeconley could you add yourself as a reviewer on this one? After discussion with product, we'd appreciate having your feedback on this as well. |
15f4bb4
to
a526efb
Compare
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.
The splitting you've done so far is already a big improvement in readability. I have a few tweaks and a proposal to make it even easier to gain confidence in the sub-expressions and overall expression by making it easier avoid & spot errors.
# The following indicate whether the user accepted the terms of use in one of our initial phases of experimentation/rollout | ||
ACCEPTED_TOU_IN_NIMBUS_EXPERIMENT = "'datareporting.policy.dataSubmissionPolicyAcceptedVersion'|preferenceValue == 3" | ||
# Accepted in 100% on-train rollout in 139 release (after May 27, 6am PT timestamp), or in earlier partial rollout indicated by presence of on-train rollout population value | ||
ACCEPTED_TOU_IN_ON_TRAIN_ROLLOUT = "(('browser.preonboarding.enrolledInOnTrainRollout'|preferenceValue && 'datareporting.policy.dataSubmissionPolicyAcceptedVersion'|preferenceValue == 2) && ('datareporting.policy.dataSubmissionPolicyNotifiedTime'|preferenceValue >= "1748350800000" || 'browser.preonboarding.onTrainRolloutPopulation'|preferenceValue))" |
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.
The current thing fails to parse because of the "174..." inside the larger quoted string. Switching the inner "
symbols to \"
should fix this.
TOPSITES_DISABLED = "(!'browser.newtabpage.activity-stream.feeds.topsites'|preferenceValue || !'browser.newtabpage.activity-stream.showSponsoredTopSites'|preferenceValue)" | ||
STORIES_DISABLED = "(!'browser.newtabpage.activity-stream.feeds.section.topstories'|preferenceValue || !'browser.newtabpage.activity-stream.showSponsored'|preferenceValue)" |
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.
Kind of a nit - to make this clearer, I wonder if this should be SPONSORED_TOPSITES_DISABLED
and SPONSORED_STORIES_DISABLED
, as that's the only thing guaranteed by this being true
. Top Sites is not guaranteed to be disabled if, for example, only browser.newtabpage.activity-stream.showSponsoredTopSites'
is false
.
Same deal with Stories being disabled if only browser.newtabpage.activity-stream.showSponsored
is set to false
.
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.
Beyond the one thing I noticed about the labelling of TOPSITES_DISABLED and STORIES_DISABLED, I think this makes sense to me. Thanks!
3183964
to
36d7d25
Compare
Thanks @dmose and @mikeconley - updated. |
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.
I notice that none of the targeting in the experiment mentions datareporting.policy.dataSubmissionPolicyBypassNotification. Don't we want to exclude people who have that set to true from at least enrollment if not also infobar display?
{SEARCH_SUGGESTIONS_DISABLED} | ||
) | ||
) | ||
""" |
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.
@mikeconley Do we want to also handle browser.newtabpage.enabled
just to be on the safe side? It is in the codebase a fair bit: https://searchfox.org/mozilla-central/search?q=browser.newtabpage.enabled&path=&case=false®exp=false. Of course, maybe that's all just dead code.
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, I think that's a good idea. I just tested it, and it doesn't appear that that state gets reflected in newtabSettings. :/ So we should check that pref too.
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.
Something like this?
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.
Looks good to me. r=dmose
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.
OK, I think we're almost there. Once the various comments here and in Slack/the doc are addressed, I think we'll be ready to go.
589c57b
to
d6f3058
Compare
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.
Looks good to me; thanks for all the hard work involved in both making this clear and making it accurate!
@jaredlockhart I think we're ready for code formatting and merge whenever you're ready. FYI, I'll be heading out on PTO around 5pm EST today and won't be back until June 2. @dmose can take over during that time. |
…yet and are on Mac or Win
@dmose just want to point out I had an error in the partial and full on train rollout variables - I've corrected those in the patch. |
OK, just looked over those; thanks for the fixes! |
Because
This commit
Fixes #12594