How can I randomly assign participants to one out of two surveys | XM Community
Question

How can I randomly assign participants to one out of two surveys

  • 25 November 2019
  • 9 replies
  • 886 views

I have two identical surveys, except for the background of the survey. I need to randomly assign participants to one of the two surveys.
An alternative solution would be to repeat the questions and use the randomizer, but I cannot find a way to add a picture as a block background (it needs to have 60 % transparency).
Does anybody have a solution ?

9 replies

Userlevel 5
Badge +15
Hi @NatMel I'm assuming you're using a generic survey link; otherwise, you could just do the random assignment ahead of time. Anyway, two things to consider...

I'm not great with custom coding, but this thread may be a useful starting point.

Another option may be to set embedded data at the beginning of your survey using the random number generator (see the very bottom of this help page). Then you could apply the randomizer based on whether that random number is above or below the mid-point of your range.
Userlevel 7
Badge +6
Or just use the randomizer block in the survey flow display 1 of 2 surveys nested under it (in the form of survey blocks).
Thanks for your help. @ClairJ, yes, I'm using a generic link.
To answer both advices, I can't have embedded surveys, because it seems that the "background" of the survey is general, I mean I can't have specific/separate backgrounds for blocks (for which I can choose the opacity).
I thought of creating a survey redirecting randomly toward survey1 and survey 2.
thanks,
Userlevel 5
Badge +15
Ah right. Understood. How about this solution? It's a bit clunky, but I think it would work...

1. Create a survey landing page in its own block, and set the random number embedded data as I described above. Require respondents to "enter" the survey.
2. At that point, apply your randomizer based on the random number generator, but have it branch to two different "end of survey" elements.
3. Program each "end of survey" element to redirect to the URL for one of your two surveys. You can do this by clicking "Customize" and then "Override survey options".
That would be perfect, that what I tried a bit earlier but, it seems that I can't have two different "end of survey", just one link can be entered for one survey.
In the meantime, I also tried to have background for blocks, wich worked using the following code
jQuery("#SurveyEngineBody").css({"background":"url('enter_source')",
"background-size": "cover",
"background-repeat": "no-repeat",
" background-position": "center center"});

jQuery(".Skin #SkinContent").css({
"background":"enter_source"
thanks for your help

Since I have 4 different surveys with their own randomizers, using another randomizer to randomly present surveys didn't work.
I solved this problem by creating a separate project that shows an embedded link to the main surveys. You can use the randomizer inside the survey flow and set it to present only one of the blocks and evenly present them. You can add as many blocks (survey links) as you wish and the participants will be shown and able to click on only one of them.
To avoid clicking to the next button without clicking on the text, set question type to Text/Graphic, use the rich content editor to add embedded links, and hide buttons by adding the code below to javascript of the questions.

Qualtrics.SurveyEngine.addOnReady(function () {
  $('NextButton').hide();
  $('PreviousButton').hide();
});

Userlevel 7
Badge +21

https://www.qualtrics.com/community/discussion/comment/37882#Comment_37882Is it possible for you to share a screenshot of your setup?
I'm just curious why this didn't work:

Since I have 4 different surveys with their own randomizers, using another randomizer to randomly present surveys didn't work.

https://www.qualtrics.com/community/discussion/comment/37887#Comment_37887I changed it so I don't have a screenshot of the previous setup.
Basicly, if each of the sub-surveys has complex flows themselves (including many questions and randomizers), arranging an umbrella randomizer for 4 surveys is nearly impossible. Creating a separate survey in which there are just 4 questions randomly presented including embedded links is much easier to keep track.

Userlevel 7
Badge +21

So you weren't loading the sub-surveys from the library, but hardcoding them into one big survey?

Leave a Reply