Choose Where User Experiment Data Is Stored
We’ve added a new configuration option that allows you to choose where user experiment data is stored in the browser.
This data includes things like:
- allocated experiments
- assigned variations
- other state needed to keep a user’s experience consistent
By storing this information in the browser, users will continue seeing the same variation on future visits, ensuring experiments remain consistent across sessions.
With this update, you can now decide whether that data should be stored in cookies or localStorage.
Why This Matters
Different websites have different technical requirements, privacy considerations, and infrastructure setups. Because of this, there is no single storage solution that fits every situation.
This new option gives you full control over how experiment state is persisted in the browser.
You can now configure storage based on what works best for your platform.
Storage Options
Cookies
Cookies store small pieces of data that are automatically sent with HTTP requests to the server.
Advantages
- Extremely widely supported
- Work across subdomains
- Accessible in both client and server environments
Considerations
- Limited storage size
- Sent with every HTTP request
- Subject to cookie policies and consent requirements
Local Storage
localStorage stores data directly in the browser and is accessible via JavaScript.
Advantages
- Larger storage capacity
- Not sent with every HTTP request
- Simple and fast client-side access
Considerations
- Only available on the client side
- Cannot be read directly by the server
- Cannot be shared across subdomains
Consistent Experiences Across Sessions
Regardless of which storage option you choose, the goal remains the same:
Once a user is assigned to a variation, the assignment is persisted between sessions, ensuring that users consistently see the same experience during an experiment.
You can now select the storage method that best fits your technical setup, performance needs, and privacy requirements.