Skip to content

Conversation

@JeffScattini-amplitude
Copy link
Collaborator

@JeffScattini-amplitude JeffScattini-amplitude commented Dec 16, 2025

…ting

Adds a new section comparing flag prerequisites with targeting based on [Experiment] user properties. Explains timing considerations, dependency tracking, and provides a table of when to use each approach.

Resolves DOC-419


Note

Adds a concise comparison between flag prerequisites and targeting via [Experiment] user properties, outlining trade-offs and when to use each.

  • Docs (content/collections/advanced-techniques/en/flag-prerequisites.md):
    • New section: Prerequisites compared to user property targeting
      • Explains using [Experiment] user properties in targeting with limitations (timing, lack of dependency visibility, potential inconsistency).
      • Describes flag prerequisites with advantages (sequenced evaluation, visible dependencies, consistent bucketing, protected changes).
      • Adds a "When to use" table mapping common use cases to the recommended approach.

Written by Cursor Bugbot for commit 1461597. This will update automatically on new commits. Configure here.

…ting

Adds a new section comparing flag prerequisites with targeting based on
[Experiment] user properties. Explains timing considerations, dependency
tracking, and provides a table of when to use each approach.

Resolves DOC-419
@vercel
Copy link

vercel bot commented Dec 16, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
amplitude-docs Ready Ready Preview Dec 16, 2025 7:40pm

@markzegarelli markzegarelli self-requested a review December 16, 2025 19:20
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment @cursor review or bugbot run to trigger another review on this PR


**Limitations:**

- **Timing issues**: The `[Experiment]` user property is set when the assignment or exposure event is ingested. If you evaluate a dependent flag before this property syncs, the user may not match the targeting rule.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Passive voice in timing issues explanation (Bugbot Rules)

The sentence "The [Experiment] user property is set when the assignment or exposure event is ingested" uses passive voice ("is set", "is ingested"). Active voice would be clearer, such as "Amplitude sets the [Experiment] user property when it ingests the assignment or exposure event."

Fix in Cursor Fix in Web


**Advantages:**

- **Evaluated together**: Prerequisites are evaluated in sequence during a single evaluation call, eliminating timing issues.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Passive voice in evaluated together bullet point (Bugbot Rules)

The sentence "Prerequisites are evaluated in sequence during a single evaluation call" uses passive voice ("are evaluated"). Active voice would be clearer, such as "Amplitude evaluates prerequisites in sequence during a single evaluation call."

Fix in Cursor Fix in Web


| Use case | Recommended approach |
|----------|---------------------|
| Users must be assigned to Flag-A before seeing Flag-B | Flag prerequisites |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Passive voice in table use cases (Bugbot Rules)

The table contains passive voice constructions: "Users must be assigned to Flag-A" (line 95) and "users who were exposed to a flag" (line 98). Consider active alternatives like "Assign users to Flag-A before they see Flag-B" and "Target users you exposed to a flag days or weeks ago."

Additional Locations (1)

Fix in Cursor Fix in Web


When Amplitude assigns a user to a flag or experiment variant, it sets a user property in the format `[Experiment] <flag_key>` with the variant key as the value. You can use this user property in another flag's targeting rules to target users based on their previous assignments.

**Example:** Target users where `[Experiment] Flag-A` equals `on`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting in these sections are kind of weird. Lots of bold text and lists

markzegarelli
markzegarelli previously approved these changes Dec 16, 2025
emetelka1
emetelka1 previously approved these changes Dec 16, 2025
Copy link

@emetelka1 emetelka1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

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.

4 participants