Skip to main content

Overview

An experiment in shipd is a variant flag whose rules split users across variants. Assignment is deterministic and sticky per user. shipd assigns variants; it does not compute experiment results, so you record each exposure in your own analytics.

Define the variants

For Go, add definitions to Config in shipd.config.go, then run shipd push. See Define flags in code for the complete file.

Split traffic

Percentage conditions on the same flag share one bucket per user, so stacked rules with increasing Rollout values split users into slices. For a three-way split: Buckets 0–3299 get semantic, 3300–6599 get hybrid (rule 1 already matched the lower buckets), and the rest fall through to control.
1

Open the flag

In the dashboard, open the project, click search-variant, and select the environment.
2

Add the rules

Click Add rule, then Percentage, and set Rollout and Serve as in the table. Repeat for the second rule. Keep them in this order.
3

Save

Set Fallthrough to control and click Save environment.
Users without a userId never match a percentage condition, so they get control. Don’t change the Rollout values or Seed mid-experiment; that moves users between variants. See how bucketing works.
Rules and Fallthrough can also use a weighted serve (kind: "weighted") that splits by weights in a single serve. The dashboard editor keeps existing weighted serves but doesn’t edit their weights; set them through the control-plane API.

Read the variant and record exposure

Log the exposure where the user actually sees the variant, and send your outcome metric (searches, conversions) to the same analytics tool. Compare metrics by variant there. SDKs also send evaluation events from production environments. The flag page’s Traffic section uses them to show recent evaluations. They are not experiment analysis.

End the experiment

Set Fallthrough to the winning variant, remove the percentage rules, and click Save environment. Then update default in your flag definitions to match, or remove the flag from code and archive it.