@@ -38,6 +38,19 @@ def __post_init__(self):
38
38
CORE_ACTIVE_USERS_TARGETING = "'{event}'|eventCountNonZero('Days', 28, 0) >= 21"
39
39
RECENTLY_LOGGED_IN_USERS_TARGETING = "'{event}'|eventCountNonZero('Weeks', 12, 0) >= 1"
40
40
41
+ # The following indicate whether the user accepted the terms of use in one of our initial phases of experimentation/rollout
42
+ ACCEPTED_TOU_IN_NIMBUS_EXPERIMENT = "'datareporting.policy.dataSubmissionPolicyAcceptedVersion'|preferenceValue == 3"
43
+ # Accepted in 100% on-train rollout in 139 release (after "1747094400000" timestamp), or in earlier partial rollout indicated by presence of on-train rollout population value
44
+ ACCEPTED_TOU_IN_ON_TRAIN_ROLLOUT = "(('browser.preonboarding.enrolledInOnTrainRollout'|preferenceValue && 'datareporting.policy.dataSubmissionPolicyAcceptedVersion'|preferenceValue == 2) && ('datareporting.policy.dataSubmissionPolicyNotifiedTime'|preferenceValue >= " 1747094400000 " || 'browser.preonboarding.onTrainRolloutPopulation'|preferenceValue))"
45
+ ACCEPTED_TOU_V1 = "'termsofuse.acceptedVersion'|preferenceValue == 1"
46
+
47
+ # The following indicate whether the user has changed prefs suggesting they prefer not to see ads or ad-like features
48
+ NEW_TAB_AND_HOMEPAGE_NOT_DEFAULT = "(!'browser.newtabpage.enabled'|preferenceValue && 'browser.startup.homepage'|preferenceValue != 'about:home')"
49
+ SEARCH_SUGGESTIONS_DISABLED = "!'browser.urlbar.suggest.quicksuggest.sponsored'|preferenceValue"
50
+ TOPSITES_DISABLED = "(!'browser.newtabpage.activity-stream.feeds.topsites'|preferenceValue || !'browser.newtabpage.activity-stream.showSponsoredTopSites'|preferenceValue)"
51
+ STORIES_DISABLED = "(!'browser.newtabpage.activity-stream.feeds.section.topstories'|preferenceValue || !'browser.newtabpage.activity-stream.showSponsored'|preferenceValue)"
52
+ ADS_DISABLED = f"(({ NEW_TAB_AND_HOMEPAGE_NOT_DEFAULT } && { SEARCH_SUGGESTIONS_DISABLED } ) || ({ TOPSITES_DISABLED } && { STORIES_DISABLED } && { SEARCH_SUGGESTIONS_DISABLED } ))"
53
+
41
54
NO_TARGETING = NimbusTargetingConfig (
42
55
name = "No Targeting" ,
43
56
slug = "no_targeting" ,
@@ -2527,6 +2540,21 @@ def __post_init__(self):
2527
2540
application_choice_names = (Application .DESKTOP .name ,),
2528
2541
)
2529
2542
2543
+ TOU_NOT_ACCEPTED_ADS_ENABLED_MAC_OR_WIN = NimbusTargetingConfig (
2544
+ name = "TOU not accepted yet, ads enabled, Mac or Win" ,
2545
+ slug = "tou_not_accepted_ads_enabled_mac_win" ,
2546
+ description = (
2547
+ "Users who have not accepted the terms of use yet, "
2548
+ "have not disabled ads, "
2549
+ "and are on Mac or Windows"
2550
+ ),
2551
+ targeting = f"((os.isWindows || os.isMac) && !({ ACCEPTED_TOU_IN_NIMBUS_EXPERIMENT } || { ACCEPTED_TOU_IN_ON_TRAIN_ROLLOUT } || { ACCEPTED_TOU_V1 } ) && !{ ADS_DISABLED } )"
2552
+ """,
2553
+ desktop_telemetry="",
2554
+ sticky_required=False,
2555
+ is_first_run_required=False,
2556
+ application_choice_names=(Application.DESKTOP.name,),
2557
+ )
2530
2558
2531
2559
class TargetingConstants:
2532
2560
TARGETING_VERSION = "version|versionCompare('{version}') >= 0"
0 commit comments