Unexpected values in embedded data π¦

If you are passing embedded data to Ethnio via Study Link or Intercept via JS code, it's common for us to receive unexpected values.
π‘ Unexpected values are anything you haven't explicitly added in Ethnio as a value up front.
The two ways you might deal with unexpected values
These work slightly differently for how you're using embedded data in Ethnio studies:
1οΈβ£ Saving unexpected values in embedded data in the editor. More on that there.
2οΈβ£ Targeting unexpected values in intercepts (spoiler: you can only exclude unexpected values). More on targeting embedded data here.
Saving unexpected values πΎ
When you add an Embedded data question in the study editor, each parameter can have a list of values you define up front, like a for Apples. Anything outside that list is an unexpected value, and the Save unexpected values toggle decides what happens to it.
[Screenshot: the Embedded data question in the editor, with the Save unexpected values toggle]
- On (default): Ethnio saves every value that comes through, including ones you never defined. A link ending in
?param_name=kis saved askeven though onlyais in your list. - Off: Ethnio saves only the values you defined and ignores the rest. A link ending in
?param_name=kis ignored.
π‘ Leave this on when youβre passing IDs, emails, or anything you canβt list ahead of time. Turn it off when you want your responses to contain only the clean, defined values.
Targeting unexpected values π―
Targeting is set up in the Embedded data targeting card on the Publish page, and it only applies to intercepts. Every value you defined appears as a row with its own checkbox, and Unexpected values gets a row of its own at the bottom of the list.
[Screenshot: the Embedded data targeting card, with the Unexpected values row highlighted]
Each checkbox works the same way:
- βοΈ Ticked means the intercept can show for that value.
- β¬ Unticked means the intercept will not show for that value.
So you can target one value, skip another, and decide separately whether unexpected values are included. Using fav_fruit with a (Apples) and p (Pears) defined:
| What you tick | Who sees the intercept |
|---|---|
| Apples, Pears, and Unexpected values | Everyone. Because everything is selected, the parameter isnβt used for targeting at all, and the intercept can show with any value of fav_fruit or without it. |
| Apples and Unexpected values (Pears unticked) | Visitors with fav_fruit=a or any value you didnβt define, such as fav_fruit=k . Visitors with fav_fruit=p are excluded. |
| Apples only (Unexpected values unticked) | Only visitors with fav_fruit=a . |
β Unticking Unexpected values is how you narrow the intercept down to just the values you picked. This is why you can only exclude unexpected values: they are included by default and you opt out by unticking them.
How the two settings relate
Saving and targeting are independent, so you can mix them however suits your study:
- Targeting decides who sees the intercept.
- Saving decides what gets stored with the response.
For example, you might target only Apples in the intercept while still saving every value that comes through, or the reverse.