Skip to main content
This guide shows you how to create a new feature flag.

Access the Feature flag creation page

  1. Click Features > Flags & Experiments > New feature flag.
  2. Enter a name for your flag.
  3. Choose the project on which you want to activate the flag.
  4. Choose a flag type: Temporary for a flag you plan to remove after launch, or Permanent for one that stays in your codebase long-term. Read Manage feature flag technical debt to learn how Kameleoon tracks each type.
  5. Add a description (optional).
  6. Click Save.
Kameleoon generates a flag key automatically based on your flag’s name, but you can edit it before you save.
The flag key is the unique ID that identifies the feature flag in your source code. Be sure to update the key in Kameleoon before editing it in your source code.
New feature flag dialog showing the flag name, flag key, project, flag type, and description fields
By default, your flag is OFF. You can activate it once it’s configured.

Advanced flag settings

The New feature flag pop-in includes Advanced settings, where you can change two settings for a single feature flag: the custom bucketing key, which sets the identifier Kameleoon uses to bucket visitors into variations, and the custom attribution window, which sets how long Kameleoon attributes conversions to a variation.
After the flag or its rules become active, changing the attribution window or the bucketing attribute affects traffic allocation and conversion tracking. Kameleoon doesn’t adjust past data retroactively, so results can differ from previous reports. These changes can skew results and reduce experiment reliability.

Custom bucketing key

By default, Kameleoon buckets visitors into variations with the visitor code. Under Custom Bucketing Key, choose a custom data attribute, such as userId, an email address, or any identifier key, to define how traffic allocation takes place and how Kameleoon buckets visitors into variations. The same user always sees the same variation, even across devices or sessions. Your application must also send the custom key to Kameleoon. Each SDK page describes how in its “Using a custom bucketing key” section, for example in the JavaScript SDK reference.

Custom attribution window

The attribution window is the period during which Kameleoon attributes a visitor’s conversions and revenue to a given variation. Kameleoon configures the default attribution window at the website level. Under Custom Attribution Window, set a different window for this flag before you launch your experiment. To learn how Kameleoon counts conversions inside the window, read Attribution window.

Structure of the Rollout Planner

The Rollout planner consists of several blocks.
  • A header indicating the flag’s name, the associated sitecode (you can copy and paste it directly from here), and the flag key. Click the flag’s name to edit its details.
  • A Setup menu, to create and manage your feature variables and feature variations URL.
  • A Rollout Planner specific to each environment. Changes to a feature flag apply only to the environment you select in this section. Kameleoon lets you link your production and staging/QA environments to the app.
  • A toggle that turns your feature flag On or Off.
  • An area for you to add rollout rules.
  • A toolbar for accessing the AI assistant, reverting your changes, and opening secondary actions (Simulate and Calculate duration).
  • A Save button.
Confirm the flag exists in Kameleoon and that you can retrieve it from your source code with a Kameleoon SDK’s isFeatureActive() or getVariation() method. Then go to your feature flag in Kameleoon and continue configuration.