Skip to content

docs(nimbus): add comprehensive Firefox for Android targeting guide#802

Open
jaredlockhart wants to merge 14 commits intomainfrom
2026-03-19-fenix-targeting-guide
Open

docs(nimbus): add comprehensive Firefox for Android targeting guide#802
jaredlockhart wants to merge 14 commits intomainfrom
2026-03-19-fenix-targeting-guide

Conversation

@jaredlockhart
Copy link
Contributor

Because

  • The existing Android custom targeting page is deprecated and only covers
    how to add new custom attributes — there is no guide covering the available
    targeting attributes, behavioral targeting, or common patterns
  • Desktop now has a comprehensive targeting guide but Android does not

This commit

  • Adds a new Fenix Targeting Guide at docs/platform-guides/android/targeting.md
    covering all available targeting attributes (from RecordedNimbusContext.kt
    and CustomAttributeProvider.kt), behavioral targeting via event queries,
    how targeting differs from desktop, common patterns from
    targeting/constants.py, install attribution, Terms of Use targeting,
    add-on detection, and how to add new attributes

Fixes #801

Because

* The existing Android custom targeting page is deprecated and only covers
  how to add new custom attributes — there is no guide covering the available
  targeting attributes, behavioral targeting, or common patterns
* Desktop now has a comprehensive targeting guide but Android does not

This commit

* Adds a new Fenix Targeting Guide covering all available targeting
  attributes (from RecordedNimbusContext.kt and CustomAttributeProvider.kt),
  behavioral targeting via event queries, how targeting differs from desktop,
  common patterns from targeting/constants.py, install attribution, Terms of
  Use targeting, add-on detection, and how to add new attributes

Fixes #801

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jaredlockhart and others added 13 commits March 19, 2026 12:21
… guide

Because

* The existing Android custom targeting page was deprecated and only covered
  how to add new custom attributes
* Better to replace it in-place than add a separate document

This commit

* Replaces the deprecated custom-targeting.md with the comprehensive Fenix
  Targeting Guide, preserving the existing slug and id so existing links
  continue to work

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…riginal doc

Because

* The original custom-targeting.md had content about the deprecated
  customTargetingAttributes approach that should be preserved

This commit

* Adds a deprecation warning block with the legacy customTargetingAttributes
  code example and a pointer to the modern RecordedNimbusContext approach
* Adds link to Custom Audiences doc in Further Reading

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Because

* Each platform guide should be self-contained and focused on its own
  application, not defined relative to another

This commit

* Removes the 'How Targeting Differs from Desktop' section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Because

* The Experimenter UI shows Languages (two-letter codes) for mobile and
  Locales (full locale codes) for desktop — they are mutually exclusive
  fields in the same UI slot
* The Fenix guide incorrectly listed Locales as a basic targeting field

This commit

* Removes Locales from the Basic Targeting table, keeping only Languages
* Renames the "Locale & Region" section to "Language & Region" and
  reorders to put language first
* Notes that locale is available in the targeting context but not used
  by the Experimenter UI for mobile

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Because

* Needed to ensure all targeting details match what the experimenter model
  actually generates for Fenix, as confirmed by the targeting tests

This commit

* Expands the sticky targeting section with the concrete mobile
  sticky/non-sticky table and a real example from the test suite
* Adds note that version targeting expressions are only included for
  Firefox for Android 98+

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sons

Because

* Each platform guide should be self-contained and not defined relative
  to another platform

This commit

* Removes desktop comparison language from Languages field, locale
  attribute, JEXL section, common mistakes, and behavioral targeting
* Removes outdated minimum version note (version 98)
* Makes the JEXL section self-contained with its own operator list

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Because

* Fenix uses jexl-rs (Rust), not mozjexl (JavaScript) — the two have
  different capabilities
* jexl-rs has no ! (NOT) operator, no built-in transforms, and different
  registered transforms than mozjexl

This commit

* Replaces all mozjexl references with jexl-rs
* Documents the exact operators from jexl-rs grammar (no ! operator)
* Adds warning about using == false for negation instead of !
* Lists only the transforms registered in Nimbus SDK targeting.rs:
  versionCompare, eventSum, eventCountNonZero, eventAveragePerInterval,
  eventAveragePerNonZeroInterval, eventLastSeen, preferenceIsUserSet,
  bucketSample
* Fixes eventAverage → eventAveragePerInterval (correct name)
* Notes that mozjexl transforms (date, length, keys, etc.) are not
  available in jexl-rs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Because

* preferenceIsUserSet depends on GeckoPrefStore which is a desktop-only
  concept — on Fenix the store is None so it always returns false

This commit

* Removes preferenceIsUserSet from the available filters table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Because

* Gecko preference support for Fenix is still in progress — omit all
  preference references until that work is complete

This commit

* Removes mention of preferenceValue from the unavailable transforms note
* Simplifies the note to just state jexl-rs has no built-in transforms

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…utes

Because

* Several attribute examples were invented rather than sourced from real
  targeting configs
* Missing attributes that are used in real configs: is_phone,
  searchEngines.current, homePageSettings

This commit

* Adds missing attributes: is_phone, searchEngines.current,
  homePageSettings.isDefault, homePageSettings.isCustomUrl
* Replaces invented examples with real ones from targeting/constants.py
  (is_default_browser, enrollments_map) or marks as not typically used
  in targeting (app_name, app_id, channel)
* Removes invented examples for attributes with no real targeting usage
  (device_manufacturer, device_model, are_notifications_enabled, etc.)
* Adds phone users pattern to common patterns section
* Reorders enrollment attributes to put commonly-used ones first

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ment

Because

* The notes explaining how UI fields generate JEXL are useful context
* But we shouldn't encourage users to replicate built-in functionality
  in advanced targeting expressions

This commit

* Restores version and language/region notes explaining the generated JEXL
* Removes "but can also be used directly in advanced targeting" wording

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Because

* The Experimenter UI uses language (not locale) for mobile and locale
  is not used in any mobile targeting config

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…fields

Because

* Several attribute rows had empty example columns
* Queried real Fenix recorded_nimbus_context telemetry to find actual values

This commit

* Adds real examples for device_manufacturer (samsung, Xiaomi, Google, etc.)
  and device_model (SM-S928B) sourced from telemetry
* Adds utm_medium example with common real value (organic)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add comprehensive Firefox for Android (Fenix) Targeting Guide

1 participant