Close an experiment to new users once it reaches its target sample size
Traffic allocation is a percentage, so an experiment keeps enrolling new users for as long as it runs. Pausing the rule
stops new users, but the SDKs then return the default variation to everyone, so enrolled users lose their variation too.
For example, a customer I work with plans experiments for a fixed sample of 20,000 users per variation. Once each variation reaches that number, they want to stop enrolling new users. The enrolled users should keep their variation while the team watches longer-term metrics for the rest of the monitoring period. Several customers have asked for this since 2023, some by count and some from a set date.
This is close to the 2023 idea "Limit number of visitors for an experiment" (FSS-I-322). That idea was closed because the SDKs are stateless and can't count visitors without a backend call. This request avoids that: the SDK doesn't need to count anything, and Fixed Horizon experiments already track when each variation reaches its sample size.
What would help, in order of preference:
1. A "closed to new users" state for an experiment rule, set by hand or on a schedule. Users with a saved assignment keep their variation, and no one new is bucketed. It reaches the SDKs in the datafile like any other rule change.
2. An option to close a Fixed Horizon experiment to new users automatically when it reaches its sample size. A manual target, in total or per variation, would cover other experiments. Overshooting by a few minutes of traffic is fine.
3. The same option in Web Experimentation.
Today teams watch the count through the REST API and change the rule themselves. Setting traffic to 0% with a User Profile Service might keep enrolled users, but the docs say to "pause the rule instead of reducing traffic to 0%".
Closing enrollment would make fixed-horizon tests easier to run as designed, and the number of users who see a change would be known in advance.