Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions experimenter/experimenter/targeting/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4056,6 +4056,20 @@ def __post_init__(self):
application_choice_names=(Application.DESKTOP.name,),
)

FX_151_TRAINHOP = NimbusTargetingConfig(
name="New Tab Fx151 Mar-27 Trainhop",
slug="newtab-151-0327-trainhop",
description=(
"Desktop users having the New Tab 151.1.20260327.141953 train hop, "
"which includes users of Fx149"
),
targeting="newtabAddonVersion|versionCompare('151.1.20260327.141953') >= 0",
desktop_telemetry="",
sticky_required=False,
is_first_run_required=False,
application_choice_names=(Application.DESKTOP.name,),
)

BUILDID_20251006095753 = NimbusTargetingConfig(
name="Build ID 20251006095753 or higher",
slug="buildid-20251006095753",
Expand Down Expand Up @@ -4181,6 +4195,53 @@ def __post_init__(self):
)


EDITORIAL_CONTENT_MARKETS = (
"['AT', 'BE', 'CA', 'CH', 'DE', 'ES', 'FR', 'GB', 'IE', 'IN', 'IT', 'US']"
)

EDITORIAL_CONTENT_AVAILABLE_MARKETS = NimbusTargetingConfig(
name="New Tab Editorial Content Available Markets",
slug="newtab-editorial-content-markets",
description=("Users in markets where Firefox New Tab Editorial Content is available"),
targeting=f"region in {EDITORIAL_CONTENT_MARKETS}",
desktop_telemetry="",
sticky_required=False,
is_first_run_required=False,
application_choice_names=(Application.DESKTOP.name,),
)

EDITORIAL_CONTENT_UNAVAILABLE_MARKETS = NimbusTargetingConfig(
name="New Tab Editorial Content Unavailable Markets",
slug="newtab-non-editorial-content-markets",
description=(
"Users in markets where Firefox New Tab Editorial Content is NOT available"
),
targeting=f"(region in {EDITORIAL_CONTENT_MARKETS}) != true",
desktop_telemetry="",
sticky_required=False,
is_first_run_required=False,
application_choice_names=(Application.DESKTOP.name,),
)

TOPSITES_1ROW_NON_EDITORIAL_FX151_TRAINHOP = NimbusTargetingConfig(
name="Non-Editorial Markets, 1-Row Top Sites, Fx151 Trainhop",
slug="topsites-1row-non-editorial-fx151-trainhop",
description=(
"Desktop users in non-editorial content markets, with top sites rows set to 1, "
"having the New Tab 151.1.20260327.141953 train hop"
),
targeting=(
f"(region in {EDITORIAL_CONTENT_MARKETS}) != true"
f" && {FX_151_TRAINHOP.targeting}"
" && 'browser.newtabpage.activity-stream.topSitesRows'|preferenceValue == 1"
),
desktop_telemetry="",
sticky_required=True,
is_first_run_required=False,
application_choice_names=(Application.DESKTOP.name,),
)


class TargetingConstants:
TARGETING_CONFIGS = {
targeting.slug: targeting for targeting in NimbusTargetingConfig.targeting_configs
Expand Down
Loading