How to stop users from being randomised twice

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

If users click on the back button on the page just after they have been randomised, and then click forward, 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 below.

show registrationpage

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

after registrationpage 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.

show page1 savevalue(username, "group", "intervention") • Saves the name of the group as intervention show page2 show page3, etc

• The other 50% of end-users will be sent to page10. • 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 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.


show page10 savevalue(username, "group", "control") • Saves the name of the group as control. show page11, etc.