Skip to content

Commit 767a41e

Browse files
committed
feat(nimbus): Advanced targeting for users who have not accepted ToU yet and are on Mac or Win
1 parent 025cd85 commit 767a41e

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

experimenter/experimenter/targeting/constants.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,6 +2527,46 @@ def __post_init__(self):
25272527
application_choice_names=(Application.DESKTOP.name,),
25282528
)
25292529

2530+
TOU_NOT_ACCEPTED_ADS_ENABLED_MAC_OR_WIN = NimbusTargetingConfig(
2531+
name="TOU not accepted yet, ads enabled, Mac or Win",
2532+
slug="tou_not_accepted_ads_enabled_mac_win",
2533+
description=(
2534+
"Users who have not accepted the terms of use yet, "
2535+
"have not disabled ads, "
2536+
"and are on Mac or Windows"
2537+
),
2538+
targeting="""
2539+
(
2540+
(
2541+
os.isWindows || os.isMac
2542+
)
2543+
&&
2544+
!(
2545+
(
2546+
'browser.preonboarding.enrolledInOnTrainRollout'|preferenceValue
2547+
&&
2548+
'datareporting.policy.dataSubmissionPolicyAcceptedVersion'|preferenceValue >= 2
2549+
)
2550+
||
2551+
'datareporting.policy.dataSubmissionPolicyAcceptedVersion'|preferenceValue == 3
2552+
||
2553+
'termsofuse.acceptedVersion'|preferenceValue >= 1
2554+
)
2555+
&&
2556+
(
2557+
'browser.newtabpage.activity-stream.showSponsoredTopSites'|preferenceValue
2558+
&&
2559+
'browser.urlbar.suggest.quicksuggest.sponsored'|preferenceValue
2560+
&&
2561+
'browser.newtabpage.activity-stream.showSponsored'|preferenceValue
2562+
)
2563+
)
2564+
""",
2565+
desktop_telemetry="",
2566+
sticky_required=False,
2567+
is_first_run_required=False,
2568+
application_choice_names=(Application.DESKTOP.name,),
2569+
)
25302570

25312571
class TargetingConstants:
25322572
TARGETING_VERSION = "version|versionCompare('{version}') >= 0"

0 commit comments

Comments
 (0)