- Answers the user gave to questions (the key would be the input component’s key)
- A value calculated by a Computed Field (the key would be the computed field’s key)
- A value set by an Experiment (the key would be the experiment’s key)
- Other types of properties (see full list below)
Where is User Data stored?
User Data is stored in three places, or ‘contexts’, and each one usually stored a different amount of data.- Embeddable Context - This is the full User Data, and is stored within the Embeddable itself. It is not available after the user refreshes or closes the tab.
- Local Storage Context - This is the subset of User Data that is stored in the user’s browser, in Local Storage. It’s used to remember a user’s answers and position in the flow after they close the tab and return later.
- Embeddables Cloud Context - This is the smallest subset of User Data that is stored in Embeddables’ databases. It is used for displaying analytics insights in the Embeddables Web App.
How to set whether/where a User Data property is stored
This feature is coming soon to the New Builder.In the meantime, ask Embeddables support to show you how to set this in the component JSON.
Types of User Data
| Type | Example | Typical Use-Case |
|---|---|---|
| Automatic Data | current_page_key | Sending the user’s current page to an API |
| Answers | weight | Asking the user for their details |
| Computed Fields | bmi | Calculating a value to decide if the user is eligible |
| Experiment Data | split_title_length | Using the user’s current variant to show or hide a page |
| URL Params | utm_source | Setting a condition based on the user’s traffic source |
| Registered Keys | access_token | Storing the result of an API request |
User Data keys and key naming
You can read our full guide to best practices for naming keys in Embeddables here:Naming keys correctly in Embeddables
Learn how to choose good names for component keys, Computed Fields and more.
Input component keys
Input components, i.e. components that collect data from the user, are special in that they store their data in the User Data. This means that the key name you choose for an input component will also be the property key name for that field in the User Data. For example, if you have an input component with the keyname, the User Data will look like this:
Choosing good key names
- All keys must be in
snake_case, meaning:- lowercase letters and underscores only
- no numbers
- no special characters
- no spaces
- no uppercase letters
- All experiment keys must start with
split_.
Input component keys, and other keys that end up in the User Data:
- Should be short and descriptive (e.g.
full_name). - Should describe the data it’s collecting, not the component (e.g.
full_namenotfull_name_input). - Should be unique within the Embeddable, except in very special cases (see below).
Keeping keys unique
All keys, whether component keys or other User Data keys, must be unique within the Embeddable. The only exception to this rule is if you’re handling multiple input components that will be ‘swapped out’ - i.e. shown/hidden such that only one of them is visible at a time. The most common use-case of this is a Split Test, e.g. testing between two different email capture pages, both containing an input component with the keyemail.
Default User Data
Default User Data allows you to set initial values for User Data properties when an Embeddable loads. These values are automatically added to the User Data object before the user interacts with your Embeddable.How it works
When you set default User Data:- The values are stored in the
defaults.userDataproperty of your Embeddable configuration - When a user loads the Embeddable, these default values are automatically added to their User Data
- Default values are applied during the reset process - when User Data is cleared, default values are preserved and reapplied
Setting default User Data
You can set default User Data through the Builder UI:- In the Builder, navigate to the Options panel for your Embeddable
- Look for the “Edit default user data JSON” option
- Click to open the JSON editor modal
- Add your default values as key-value pairs in JSON format
Use cases
Default User Data is useful for:- Pre-filling form fields - Set default values that users can modify
- Setting initial state - Define starting values for conditions or logic
- Tracking metadata - Add default tracking parameters that persist throughout the user’s session
Important limitations
Requires Registered Keys - If you want to set default User Data for keys that aren’t already created by components, computed fields, or other features, you must add those keys to Registered Keys. This ensures the Embeddable is aware of them and can watch for changes.
Behavior with reset
When you reset User Data (either programmatically or through user actions), default User Data values are preserved and reapplied. This ensures that your Embeddable always starts with the correct initial state. The reset process:- Clears most User Data properties
- Preserves system properties (like
entryId,current_page_id, etc.) - Preserves computed fields and experiment keys
- Reapplies all default User Data values
Default User Data values will not override existing User Data. If a user already has a value for a key, the default will not replace it unless the User Data is reset.

