How to SetEmbeddedData for MC Response to "1" "2"..etc based on response selected | XM Community
Skip to main content

I have setup my survey where the first question is a MC question with multiple responses.
Ex: If you would like to learn more about the following food items, please click on the different categories below. When you are done, please click "Continue Report" .

  • apple

  • banana

  • pear

  • Continue Report


When a participant selects one of these responses, they are taken to a page where they can read everything about that food item and then go back to the main page. The participant selects "continue report" to move to the next set of questions.
I would like to know what items the participant has selected to read. So if they selected apple, I would like to have "1" in my data set.
In my survey, in the main question, I have set the following code to my JS box:
Qualtrics.SurveyEngine.addOnReady(function(){
   Qualtrics.SurveyEngine.setEmbeddedData ( 'Apple' , '1' )
Qualtrics.SurveyEngine.setEmbeddedData ( 'Banana' , '1' )
Qualtrics.SurveyEngine.setEmbeddedData ( 'Pear' , '1' )
});

However, I do not see "1" in my excel data set.
If someone could help me solve this, I would greatly appreciate it.
Thank you!

I'm guessing you are using survey flow to display the information for each food item? If so you can just set the embedded data in the survey flow. No custom code required. in the branch where you display the banana information add embedded data Banana : 1
If you aren't you can still add some logic in the survey flow to set embedded data.


Leave a Reply