A feature flag lets a team turn a feature on for part of its visitors and compare the result, without shipping separate code for each group. In CROforce you set it up as a test of type Feature rollout (feature flag).
What a flag does today. CROforce saves the flag's key, variants, values and traffic split, and lets you publish, pause and complete it like any test. The tracking script has no method for your site's code to read the flag, so a flag doesn't change anything on your site by itself yet. To test a change your visitors can see today, use a visual editor test (with Add JavaScript for code changes) or a redirect test.
Create a feature flag
- Go to Tests › Tests and click New Test.
- Type a Test name, like New checkout flow.
- Under Test type, choose Feature rollout (feature flag).
- Check the Feature flag key. CROforce fills it from the name (
new-checkout-flow). Edit it if you like: letters, numbers, hyphens and underscores, up to 64 characters. - Click Create Test. The flag editor opens.
Set up the flag
The left side of the flag editor has two groups, Rules setup and Flags setup.
Variants
Variants are the versions of the feature, such as off and on, or three versions of a layout. Click Add variant to add one. Select a variant to give it a Name and a Description.
Parameters
A parameter is the value each variant carries. Click Add parameter, pick the variant, then set:
Field | Options |
|---|---|
Type | Boolean (True or False), String, Number or JSON. |
Value | The value for that variant, such as |
Description | A note for your team. |
Rules: coverage and traffic allocation
- Coverage — Include __% of users in the experiment. Start small (say 10%) and raise it as you gain confidence.
- Traffic allocation — how the included visitors are shared between variants. Select a variant and drag the slider or type a percentage; the others adjust so the total stays 100%.
Publish the flag
Click Save to keep your work, and Publish to make the flag active. The actions menu beside them has Pause, Resume, Complete, Duplicate and Delete, as for other tests — see Publish, pause and complete a test. On the Tests page, clicking Edit on a flag reopens the flag editor.
Next steps
- Visual editor tests: Change a page for part of your visitors today.
- Traffic allocation: How visitors are split between versions.
- Track custom events: Count conversions from your own code.
Frequently asked questions
Can I read a feature flag value from my website's code?
Not yet. The CROforce tracking script has no method for reading a flag. You can set up the flag, its variants and its rollout in CROforce, but your code can't yet ask which variant a visitor got.
What characters can a feature flag key use?
Letters, numbers, hyphens and underscores, up to 64 characters. CROforce builds the key from the test name until you edit it yourself.
