The survey does not load randomized texts/embedded data from javascript (conjoint experiment)? | XM Community
Skip to main content
Solved

The survey does not load randomized texts/embedded data from javascript (conjoint experiment)?

  • May 12, 2022
  • 2 replies
  • 140 views

Hi,
I'm trying to use javascript to reproduce an example of a conjoint experiment from conjoint how-to.pdf (m-graham.com). Basically, there are 4 steps in implementing a conjoint experiment:
(1) embed an HTML table in question text:
Screen Shot 2022-05-11 at 6.32.19 PM.png(2) embed the following javascript code to randomize the levels for each attribute:
Screen Shot 2022-05-11 at 6.34.46 PM.png(3) use loop&merge function to make the choice task display multiple times:
Screen Shot 2022-05-11 at 6.37.02 PM.png(4) save embedded data in survey flows (I already moved the embedded data block to the very top of the survey flow):
Screen Shot 2022-05-11 at 6.42.33 PM.png
I just reproduce this simple example, where a respondent will see the conjoint table twice: https://uwartsandsciences.sjc1.qualtrics.com/jfe/form/SV_0TmtNxT07EOO2fI. However, when I enter this survey, the first choice task never loads randomized texts from javascript, unless I refresh the webpage multiple times or re-enter this link. But the second choice task can show these randomized texts.

Does anyone know how to solve this problem?

Best answer by TomG

It seems your script is attached to the conjoint question (in the loop & merge). It needs to be attached to a question in a block before the loop & merge.

2 replies

Shashi
Level 8 ●●●●●●●●
Forum|alt.badge.img+34
  • Level 8 ●●●●●●●●
  • 654 replies
  • May 17, 2022

Try to test this using anonymous link and see if it works?


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6083 replies
  • Answer
  • May 17, 2022

It seems your script is attached to the conjoint question (in the loop & merge). It needs to be attached to a question in a block before the loop & merge.