Test Kitchen/GrowthBook user guide/Configuring experiments
CustomElevatedAccess role or greater. See Test Kitchen/GrowthBook user guide/Access for more information on roles and how to request access.
This part of the GrowthBook user guide focuses on creating, starting, and analyzing experiments.
How do I…?
Decide which metrics should be goal, secondary, or guardrail
| Metric type | Product Analytics glossary | GrowthBook guidance |
|---|---|---|
| Goal
(Primary) |
The main outcome you are trying to impact through your intervention. This is what you are primarily using for evaluating your hypothesis and for deciding whether to deploy an intervention more widely or iterate and test again or abandon the idea entirely. | The primary metrics you are trying to improve with this experiment. |
| Secondary | Used to learn about additional impact of the intervention in an experiment, but are not primary targets of the intervention. They reveal side effects (both positive and negative) of trying to improve the Primary Metric with the intervention. | Additional metrics to learn about experiment impacts, but not primary objectives. |
| Guardrail | Metric that we monitor in addition to the Goal Metric(s) and any Secondary Metric(s) to make sure that the intervention we are testing does not have a negative impact in ways we care about – that is, to make sure we are not going off the rails.
These are assurances that the intervention does not have unintended negative side effects on the feature or more generally. |
Metrics you want to monitor, but are NOT specifically trying to improve. |
Best practices: a single goal metric of interest. Everything else should be a secondary metric or a guardrail. The choice of metric should (1) be supported by a theory of change for the product and user behavior, and (2) be sensitive and timely to the planned intervention.
If you have multiple goal metrics (no more than 5), you should consider the potential tradeoffs and try to make them explicit. What if the experiment has a meaningfully positive impact on one primary metric but a meaningfully negative impact on another, rather than positively impacting both?
The more goal metrics you have, the more difficult it becomes to know when to stop your experiment.
Furthermore, our GrowthBook installation uses experiment decision framework which uses goal metrics and guardrail metrics to produce recommendations of decisions. For example, if any of the guardrail metrics are significantly bad (<0.01% Chance To Win) then the system will recommend you to rollback because the treatment is having a statistically significant negative effect on a metric you do not want to negatively affect.
Create an experiment
To create a new experiment, click Create > Experiment on the GrowthBook homepage or from Experimentation > Experiments click Add > Create New Experiment.
Step 1: Specify experiment details
Please provide a description and, ideally, also your hypothesis for the experiment.
- Please use a descriptive experiment name that makes it clear what change is being tested.
- Project should be
Wikimedia. - The hypothesis should be specific to the change you are testing with the experiment.
- This is not necessarily the same as the hypothesis in the P&T OKR framework.
- If the experiment is an A/A test, there isn't a hypothesis being tested so leave it blank. You will have a chance to add a Description on the Overview page.
- For Assignment Attribute:
MW user IDis for conducting the experiment on all logged-in users, which includes both Permanent users and Temporary users.Edge Unique (Cache splitting)is for conducting the experiment on all traffic, which includes logged-in and logged-out users. Since splitting the cache creates stress for our caching infrastructure, these experiments have low traffic limits.Edge Unique (Cache Non-splitting)is same as the other option, but does not split the cache. Page contents cannot be varied with PHP SDK, only JS SDK. Since this option does not create stress for our caching infrastructure, these experiments have higher traffic limits.
- If this is an OKR-related experiment, please specify the Related OKRs with format
FY##/## OKR #.#(e.g. "FY25/26 SDS 2.3", "FY26/27 DE 1.1"). - Selecting which contextual attributes to collect at experiment level:
- Reasons for collecting contextual attributes at experiment level:
- You plan to analyze the experiment manually and need an easy way of segmenting the data.
- Most metrics don't require contextual attributes but if you plan to analyze a metric which does require a specific attribute for some events but your instrumentation does not record it at event level. For example: Permanent account creation rate requires
account_createdevents to haveperformer.is_tempbut the instrumentation does not record it at event level.
Experiment#sendExposure()collects a predefined set of contextual attributes with just experiment exposure events which enable our set of Dimensions. SeeEXPOSURE_CONTEXTUAL_ATTRIBUTESin Experiments.js for latest list.
- Reasons for collecting contextual attributes at experiment level:
- For Risk Level and Security and Legal Review, please refer to Test Kitchen/Regulation section.
- Leave Test Kitchen UI Link field blank since you are creating this experiment in GrowthBook.
Step 2: Update Experiment Key
Experiment Key identifies your experiment and what you use with getExperiment() in TK SDKs.
Some guidelines:
- The key should start with a letter and can only use lowercase letters, numbers, or dashes.
- The key must match the experiment name in code.
Step 3: Update Variations
In the Implementation section, click Pencil button to open the Edit Traffic & Variations modal. Now you can edit variation names and add descriptions.
In general we recommend using descriptive names like "Redesigned feed" and "Shown banner", but if the experiment name is clear and descriptive enough about the change being tested, generic names like "Control" and "Treatment" also work.
control and treatment for readability, but GrowthBook defaults to integer-based IDs (e.g. 0, 1 which must be manually changed.
To update the Variation IDs:
- Click Switch to advanced mode (in the Edit Traffic & Variations modal).
- Now you can replace the integer-based default values (e.g.
0for Control) with correct values that correspond to code (e.g.controlfor Control) – what you use in code withExperiment#isAssignedGroup(). - We recommend also adding a Description for each variation while you're here.
We recommend adding images (e.g. screenshots) of the variations – this will greatly improve your experiment's documentation in GrowthBook and make it easier for others to know what change you tested.
Step 4: Update Traffic Allocation
To select which wikis your experiment will be active on:
- In the Implementation > Targeting section, click the Pencil button to open the Edit Targeting modal.
- In Target by Attributes, click Add attribute targeting.
- The INCLUDE IF rule should be:
MediaWiki database codeis any of- Your target wikis (e.g. "enwiki" for English Wikipedia, "commonswiki" for Wikimedia Commons)
You must select at least one wiki, and the maximum number of targetable wikis is 100.
By default, experiments use 100% of traffic, which is always relative to maximum allowed traffic the selected Assignment Attribute.
For example:
- For
MW user ID-based experiments:- 100% in GB will mean 100% of logged-in users (temporary & permanent)
- 50% in GB. will mean 50% of logged-in users (temporary & permanent)
- For
Edge Unique (Cache splitting)andEdge Unique (Cache Non-splitting)-based experiments:- 100% in GB will mean 1% on English Wikipedia (if targeted) and 10% on all other wikis.
- 50% in GB will mean 0.5% on English Wikipedia (if targeted) and 5% on all other wikis.
Step 5: Add Tags
We use Tags to organize experiments and make them easy to filter and find, so please add:
- A tag for your team, which will help you find all experiments conducted by your team
- One of these tags:
OKR WorkorEssential Work– these will help us understand how many experiments are essential work vs in support of objectives and key results - One of these tags:
aa testorab test
Step 6: Schedule and start the experiment
Click + Add Schedule and pick a start date and time. Once you have scheduled your experiment, click Approve for Scheduled Start at the top.
Please ignore the first item "Add at least one Linked Feature…" as we currently cannot hide/remove it and are waiting for a fix upstream. Until that is fixed, when you click Start Experiment, GrowthBook will warn you that you have some tasks left to complete. Assuming you have done all of the other tasks, you can safely click Start Anyway.
Avoid starting the experiment on Thursday if the code for it is riding the MediaWiki deployment train that week, since Group 2 wikis (e.g. English Wikipedia) get deployed to sometime on Thursday – usually after the 14:30 UTC Test Kitchen deployment/activation window.
Step 7: Update Analysis Settings
The experiment will only be analyzed if you add metrics. If the metrics you need to add are not defined yet, you can finish creating the experiment and add them later. Follow our guide to metrics in GrowthBook to define your metrics and then add them to the experiment at any time within 90 days of the experiment's start date.
Make sure your experiment has these settings:
- Data Source should be
Presto Analytics Iceberg(default) - Experiment Assignment Table will be
Web experiments(Identifier type:subject_id) - Activation Metric should be
None. (Because experiments should only be logging exposure when user is actually exposed to a variation.[1])
Please consult the section at the top to help you decide which metrics should be goal, secondary, or guardrail.
Check allotted traffic
Once your experiment has started, you can check that the allotted traffic is accurate by checking the API responses associated with your experiment.
If it's an edge-unique experiment, look for your experiment name as a key in https://test-kitchen.wikimedia.org/api/v1/experiments?format=config&authority=varnish
For logged-in experiments, check https://test-kitchen.wikimedia.org/api/v1/experiments
Import an externally managed experiment for analysis
GrowthBook allows you to import experiments that are managed outside of GrowthBook but collecting data adhering to the system's expectations.
Once the experiment has started collecting data and that data has been processed (approx. 3 hours), you will be able to import it into GrowthBook for analysis:
- On the Experiments page, click Add > Import Existing Experiment.
- Click Get New Data if you don't see your experiment in the list. Make sure you're importing from the
Presto Analytics Icebergdata source. - Select your experiment.
- Populate the fields (experiment name, description, hypothesis, Phabricator link).
- Add
external importedtag. This will let Test Kitchen's GrowthBook integration layer know to bypass validation of the experiment's configuration that the system performs on all GrowthBook-managed experiments. If you don't add this tag, your imported experiment's status will always be changed to Draft and you will not be able to analyze it. - On the Targeting screen, update the variation names (pre-populated from observed
experiment.assignedvalues fromexperiment_exposureevents).
The experiment will only be analyzed if you add metrics. If the metrics you need to add are not defined yet, you can finish importing the experiment and add them later. Follow our guide to metrics in GrowthBook to define your metrics and then add them to the experiment at any time within 90 days of the experiment's start date. Please refer to the section below to help you choose which metrics should be goal, secondary, or guardrail.
Resolve validation errors
When you save or start an experiment, inline validation checks are run in GrowthBook. If a check fails, GrowthBook shows a message and either blocks the action or flags it:
- Errors (blocking): the experiment cannot be saved or started until you fix it.
- Warnings (non-blocking): the experiment can still start but the flagged issue should be addressed.
These checks are the only validation of your experiment. They run in GrowthBook as you save and start your experiment. Every error needs to be resolved before starting an experiment.
Some checks run while the experiment is in draft mode. Other checks run only when the experiment is started. An experiment that saves cleanly as a draft can still be blocked at launch.
Test Kitchen reads experiments from GrowthBook, applies deployment-window date normalization, and serves them.
Validation errors: quick reference
| # | Message (verbatim) | Type | Fires on | Section |
|---|---|---|---|---|
| 1 | The Experiment Key must start with a letter or number; contain only letters, numbers, hyphens, underscores, or periods; and must be between 8 and 63 characters long | Error | Draft + Start | Tracking key |
| 2 | variation ids must be changed from the default integers | Error | Start | Variations |
| 3 | variation ids must start with a letter or number; contain only letters, numbers, hyphens, underscores, or periods; and must be between 1 and 63 characters long | Error | Draft + Start | Variations |
| 4 | Missing Description and Hypothesis | Warning | Start | Details |
| 5 | must be tagged OKR Work or Essential Work | Warning | Start | Tags |
| 6 | must have a team tag | Warning | Start | Tags |
| 7 | Risk Level is Risk assessment pending: experiments cannot run until resolved | Error | Start | Regulation |
| 8 | A Security Review URL is required when Risk Level is <level> | Error | Draft + Start | Regulation |
| 9 | risk_level <declared> is lower than <required> required by the selected contextual attributes | Error | Draft + Start | Regulation |
| 10 | wiki count must be 1–100, got <n> | Error | Draft + Start | Targeting (wikis) |
| 11 | invalid wiki IDs: <ids> | Error | Draft + Start | Targeting (wikis) |
| 12 | Invalid operators: When adding wikis the only valid operators are "is equal to" and "is any of" | Error | Draft + Start | Targeting (wikis) |
| 13 | You must select a datasource and Experiment Assignment Table for this experiment | Error | Start | Analysis settings |
| 14 | You have not added yet a goal metric | Warning | Start | Metrics |
Fix each validation failure
Tracking key
1. "The Experiment Key must start with a letter or number; contain only letters, numbers, hyphens, underscores, or periods; and must be between 8 and 63 characters long"
- Why: The experiment's tracking key (slug) doesn't match the required pattern. It must be 8–63 characters, start with a letter or number, and use only letters, numbers, hyphens (
-), underscores (_), or periods (.) — no spaces or other symbols. - Fix:
- Open the experiment in GrowthBook.
- Edit the key field — labeled Tracking Key in the new-experiment form, and Experiment Key in the "Edit info" modal of an existing experiment.
- Enter a value like
mobile-font-size-v2(≥ 8 chars, valid characters only). Save.
- Good:
desktop-search-v1,android.toolbar_test,readmore_2026 - Bad:
test(too short),my experiment(space),2(too short / integer-like).
Variations
2. "variation ids must be changed from the default integers"
- Why: GrowthBook seeds every new variation with an integer key (
0,1,2, …). A bare integer means the variation hasn't been mapped to its feature code yet. This check fires when you start the experiment and blocks launch if any variation key is still a default integer. - Fix:
- Open the experiment and go to the Variations section; click Edit Variations.
- Each variation row has a Key column — this is the variation id the hook checks.
- If the Key fields aren't editable, click the Switch to advanced mode link (it reads Advanced mode once enabled) to turn on id editing.
- Change each variation's Key from the default integer to the identifier your client/feature code checks for — e.g.
control,treatment,variant-a. (The adjacent Variation Name is just a human label and does not satisfy this check — you must change the Key.) - Save, then start the experiment again.
- Note: The hook can only confirm the keys are not bare integers; it cannot verify they match your code. Make sure the keys you set are exactly what your instrument/feature reads.
3. "variation ids must start with a letter or number; contain only letters, numbers, hyphens, underscores, or periods; and must be between 1 and 63 characters long"
- Why: A variation key is malformed — it contains a space or illegal character, is empty, or is over 63 characters. (This is the format rule; it runs in both draft and at start. Error #2 is the separate "still an integer" rule.) The pattern is enforced because the edge/Varnish layer expects well-formed keys.
- Fix:
- Variations → Edit Variations (use Switch to advanced mode if the Key fields aren't editable, as in #2).
- Rename each Key to 1–63 characters, starting with a letter or number, using only letters, numbers,
-,_,.. - Save.
- Good:
control,treatment,variant-a,test_1,v2.0 - Bad:
variant a(space), empty,*treatment(leading symbol).
Details & tags
(These are warnings — they don't block launch, but resolve them for governance/quality.)
4. "Missing Description and Hypothesis" (warning)
- Why: At start time, both the Description and the Hypothesis are empty. You need at least one of them.
- Fix: Open the experiment and fill in the Description and/or Hypothesis field. Having either one clears the warning.
5. "must be tagged OKR Work or Essential Work" (warning)
- Why: Every running experiment must declare how it's funded with a type-of-work tag: exactly one of OKR Work (maps to a specific objective) or Essential Work (baseline upkeep/maintenance).
- Fix:
- Open the experiment's Tags field.
- Add the tag
OKR WorkorEssential Work(exact text, case-sensitive). - If OKR Work, record the specific objective(s) in the
related_okrscustom field (WMF custom-field display name — confirm against the live instance).
6. "must have a team tag" (warning)
- Why: Beyond the type-of-work tag (#5), a running experiment also needs a team tag identifying the owning team. Practically this means you need at least two tags: one type-of-work tag + one team tag. (The hook detects this as "only the OKR/Essential tag present, or no tags at all.")
- Fix: In the Tags field, add your team's tag (e.g.
Web,Android,Growth) in addition to the OKR Work/Essential Work tag.
Regulation (risk & privacy)
7. "Risk Level is Risk assessment pending: experiments cannot run until resolved"
- Why: The Risk Level custom field is still at its GrowthBook default, Risk assessment pending. An unresolved risk assessment blocks launch.
- Fix:
- Open the experiment's Risk Level custom field.
- Change it from Risk assessment pending to one of:
- Tier 1: High risk
- Tier 2: Medium risk
- Tier 3: Low risk
- Pick the tier that matches the attributes you collect (see #9). Save and start again.
8. "A Security Review URL is required when Risk Level is <level>"
- Why: You set Risk Level to Tier 1 (High) or Tier 2 (Medium) but left the Security Review URL empty. Medium/high-risk experiments require a link to the security & legal review. (Low risk does not.)
- Fix:
- Open the Security Review URL custom field.
- Paste the URL of the completed security/legal review (ticket or doc). Save.
- If a review hasn't happened yet, start one before launching. Or if the experiment is genuinely low-risk and collects no sensitive attributes, correct the Risk Level to Tier 3: Low risk.
9. "risk_level <declared> is lower than <required> required by the selected contextual attributes"
- Why: The contextual attributes you're collecting demand a higher minimum risk level than you declared. Risk must be proportional to privacy sensitivity. The minimum is computed from which categories of attribute you selected:
| Attribute categories selected | Minimum risk level |
|---|---|
| Only one category | Tier 3: Low risk |
| Personal Info + Unique ID | Tier 2: Medium risk |
| Long-term Viewing History + Unique ID | Tier 2: Medium risk |
| Personal Info + Unique ID + Long-term Viewing History | Tier 1: High risk |
- Categories (current attribute → category mapping):
- Personal Information:
agent_ua_string - Unique ID:
performer_id,performer_name,agent_app_install_id - Long-term Viewing History:
page_id,page_title - App schemas automatically include
agent_app_install_id(a Unique ID attribute), which can raise the required tier even if you didn't select it explicitly.
- Personal Information:
- Fix (choose one):
- Raise the risk level to meet or exceed the required tier from the table (then satisfy #8 if that pushes you to Tier 1/2), or
- Remove the sensitive contextual attributes you don't actually need, so the required minimum drops.
- Reference: Contextual attributes § Privacy considerations
Targeting (wikis)
10. "wiki count must be 1–100, got <n>"
- Why: Your targeting condition resolves to 0 wikis or more than 100. An experiment must target 1–100 wikis (duplicates are de-duplicated before counting).
- Fix: Edit the phase Targeting condition on the MediaWiki database code attribute so it lists between 1 and 100 wikis. If you need a broader rollout, split it or talk to the Test Kitchen team.
11. "invalid wiki IDs: <ids>"
- Why: The targeting condition contains wiki codes that aren't valid MediaWiki database codes. The message lists the offending codes.
- Fix:
- Edit the Targeting condition.
- Replace each listed code with a valid database code (e.g.
enwiki,frwiki,eswiki,jawiki,commonswiki). Check Special:SiteMatrix / the database-code list if unsure. - Save. (The valid-wiki list is maintained in the hook from
wikis.tsv; if a legitimately new wiki is rejected, the list may neednpm run load:wikis— flag the Test Kitchen team.)
12. "Invalid operators: When adding wikis the only valid operators are "is equal to" and "is any of""
- Why: Wiki targeting only supports two operators. You picked a different one from the condition dropdown (e.g. is not equal to, is none of, is greater than, matches regex, etc.).
- Fix: In the Targeting builder for the MediaWiki database code attribute, set the operator dropdown to only one of:
- is equal to — a single wiki, e.g.
eswiki - is any of — multiple wikis, e.g.
enwiki,frwiki - (These are the exact operator labels in the GrowthBook condition dropdown; they map to
$eqand$in.)
- is equal to — a single wiki, e.g.
- JSON equivalents:
{"MediaWiki database code": "eswiki"}or{"MediaWiki database code": {"$in": ["enwiki", "frwiki"]}}
Analysis settings
13. "You must select a datasource and Experiment Assignment Table for this experiment"
- Why: When you start the experiment, no Data Source is selected. GrowthBook needs a Data Source (and its Experiment Assignment Table) to query exposure data and analyze results.
- Fix: In the experiment's Analysis Settings, set the Data Source (e.g. Presto Analytics Iceberg) and the Experiment Assignment Table (e.g. Web experiments). Save and start again (GrowthBook won't let you pick a Data Source without also picking an Assignment Table, so setting the Data Source resolves both).
Metrics
14. "You have not yet added a goal metric" (warning)
- Why: The experiment has no goal metric. This is a warning, not a blocker. You can start without one and add it later. A goal metric is required before results can be analyzed.
- Fix: Add at least one metric under Goal Metrics in the experiment's metrics section. It can be added after launch, but add it before you expect to read results.