Thank you for your fast response!
However, I was unable to determine how to present four stimuli on a single page while also conditioning the second set of stimuli based on the first set. For instance, if a participant views an ad with an image in the first set, they must also view an ad with an image in the second set. Conversely, another participant might see an email with an image instead of an ad, and so on.
Given these challenges, I decided to continue with creating a separate page for each condition and duplicating the questions under each stimulus. I started with creating the random generator and the 4 groups, and later i used the following PHP code to randomly assign participants to the pages:
// The random number rolled via CO15
$group = value('CO15');
// Depending on the draw, direct participants to different pages
if ($group == 1) {
$order = random(1, 2);
put('Order1', $order);
if ($order == 1) {
setPageOrder('1A', '1B', 'CH');
} else {
setPageOrder('1B', '1A', 'CH');
}
} elseif ($group == 2) {
$order = random(1, 2);
put('Order2', $order);
if ($order == 1) {
setPageOrder('2A', '2B', 'CH');
} else {
setPageOrder('2B', '2A', 'CH');
}
} elseif ($group == 3) {
$order = random(1, 2);
put('Order3', $order);
if ($order == 1) {
setPageOrder('3A', '3B', 'CH');
} else {
setPageOrder('3B', '3A', 'CH');
}
} else {
$order = random(1, 2);
put('Order4', $order);
if ($order == 1) {
setPageOrder('4A', '4B', 'CH');
} else {
setPageOrder('4B', '4A', 'CH');
}
}
The code works well, but I keep getting the following message:
Warning
Please note that the random values created via random() or shuffle() will not automatically be stored in the data set. If necessary, you may use put() to store them.
Is there any way to solve this issue? It would be great to hear your opinion, making sure I am on the right track.
Thank you!