How to stop users from being randomised twice

From Lifeguide Wiki
Revision as of 15:13, 7 July 2014 by Judy (talk | contribs)
Jump to navigation Jump to search

If users click on the back button after being randomised, they will be re-randomised. To prevent users from being re-randomised, you can insert extra logic, which direct users to the original group they were allocated to.

The example below relates to splitting end-users into 2 groups. The 2 extra lines of logic that stop users from being randomised again are:

after registrationpage if (loadvalue(username, "group") = "intervention") goto page1 after registrationpage if (loadvalue(username, "group") = "control") goto page10

These 2 lines stop users from being re-randomised only if they are written in the correct place in your logic file. They need to be written just before the randomisation logic as shown in below.

show register

after register if (loadvalue(username, "group") = "intervention") goto page1 after register if (loadvalue(username, "group") = "control") goto page10 after register if (randomnumber (0,1) = 0) goto group2 • This is the command that randomises end-users into one of two groups and then sends them onto the right section. So a more detailed explanation of this logic sees that after the end-users have moved past the welcome page they will be automatically assigned to one of two groups using the command randomnumber (0,1). Those in the ‘0’ group will then be sent to the section that has been labelled group2 NB: It is important that you do not repeat the logic command for group 1 as otherwise that will not be split evenly. begin group1 show q1p1 savevalue(username, "group", "group1") • Saves the name of the group as group1. show q1p2

• The other 50% of end-users will be sent to the section for “group1”. This consists of two pages of questions named q1p1 and q1p2. • It is important for this section to come before the section that the rest of the group has been sent to in the randomisation logic. If not the logic will simply move onto the next line of commands and send all end-users to that group. • The last page on each section will either need a jump button to a final page that users of both groups can see (as has been done on q1p2 in this example) or no button at all. If this page had a next button, end-users of the first group will then go straight into the section for the second group. end • Remember that whenever you start a section you must remember to end it with the command end (this is explained in the logic dictionary)

begin group2 show q2p1 savevalue(username, "group", "group2") • Saves the name of the group as group2. show q2p2 end • Shows the pages for group2 that only those randomised to 0 will see. show final