PostHog logo on a clipboard beside a laboratory flask, illustrating experiment naming

PostHog Experiment & Feature Flag Naming Guidelines

Clear and consistent naming helps your team instantly understand what each PostHog experiment is for, without having to dig through…

Clear and consistent naming helps your team instantly understand what each PostHog experiment is for, without having to dig through its setup. If you are new to PostHog, start with our guide to setting up PostHog before applying these naming conventions. These guidelines ensure every test has a meaningful, trackable name and making collaboration and analysis easier.

If you’re looking for instructions on creating an experiment from scratch in PostHog, see PostHog’s guide to creating an experiment.

At a glance:

  • Use [Experiment Number] – [Step of the Funnel/Page] – [Test Hypothesis] for experiment names.
  • Use a sequential 3-digit number, a clear funnel or page step, and a short phrase for the change being tested.
  • For feature flags, use [Experiment Number]-[step-of-funnel-page-hypothesis] in lowercase with hyphens and no spaces.
  • Keep names specific, concise, consistent, and scalable.

Why Naming Matters

A well-named experiment is self-explanatory. It tells you:

  • What part of the journey it tests.
  • What specific change or idea is being tested.
  • How it fits in your overall testing history.

Consistent naming saves time, reduces confusion, and helps teams avoid duplicate or conflicting tests.

Experiment Naming Format

We use this structure for all experiments; see PostHog’s experiment overview for how variants, metrics, and feature flags fit together:

[Experiment Number] – [Step of the Funnel/Page] – [Test Hypothesis]

Experiment Number

  • A sequential 3-digit number (e.g., 001, 002, 003).
  • Makes it easy to track and reference, even as the test library grows.

Step of the Funnel/Page

  • Identifies where in the user journey the test runs. Examples: Homepage, Signup, Checkout, Onboarding.

Test Hypothesis

  • A short, clear phrase describing the change being tested. Examples: CTA Text, Modal Design, Pricing Layout. Pair the hypothesis with a measurable outcome using our A/B testing metrics guide.

Feature Flag Naming Format

For feature flags in code, we use a similar format, optimized for implementation; PostHog’s feature flag code examples show how these keys are used in the SDK:

[Experiment Number]-[step-of-funnel-page-hypothesis] For implementation context, see how to read loaded PostHog feature flags.

  • Lowercase, no spaces.
  • Use hyphens for readability.
  • Often abbreviate or simplify the funnel/page step for consistency in code.

Why?
Feature flag keys need to be predictable, consistent, and easy to type or search in codebases. PostHog’s feature flag best practices cover clear naming and flag hygiene too.

Examples

Experiment Names (for internal docs and dashboards):

010 – Pricing Page – Toggle Design
015 – Onboarding – Welcome Modal

Feature Flag Keys (for code):

010-pricing-page-toggle-design
015-onboarding-welcome-modal

We use 3-digit numbers to ensure unique identifiers even as we scale to hundreds of experiments.

Best Practices

Be specific. Avoid generic names like “Test 1” or “Homepage Experiment.”
Keep it concise. Aim for clarity without long-winded descriptions.
Use consistent terms. Align naming across teams and projects. For a broader measurement taxonomy, see our event tracking plan framework.
Plan for scale. Choose a format that works for dozens or hundreds of tests. For broader experiment planning, see PostHog’s experiment best practices.

Frequently asked questions

What is the recommended format for a PostHog experiment name?

Use [Experiment Number] – [Step of the Funnel/Page] – [Test Hypothesis] for experiment names.

Why use a sequential three-digit experiment number?

We use 3-digit numbers to ensure unique identifiers even as we scale to hundreds of experiments.

What belongs in the funnel/page part of an experiment name?

The funnel/page part identifies where in the user journey the test runs; examples include Homepage, Signup, Checkout, and Onboarding.

How should the test-hypothesis segment be written?

Write the test hypothesis as a short, clear phrase describing the change being tested, such as CTA Text, Modal Design, or Pricing Layout.

How should the hypothesis connect to measurement?

Pair the hypothesis with a measurable outcome using the A/B testing metrics guide.

How should feature-flag keys be formatted in code?

For feature flags, use [Experiment Number]-[step-of-funnel-page-hypothesis] in lowercase with hyphens and no spaces.

What naming practice helps avoid vague experiment names?

Avoid generic names like “Test 1” or “Homepage Experiment.”

What qualities should a feature-flag key have in a codebase?

Feature flag keys need to be predictable, consistent, and easy to type or search in codebases.

Decorative

Did you know?

We can just do things for you!

Related Resources

If you want to go further, we’ve also explained:

Check them out for step-by-step implementation guides.