How to stop users from being randomised twice
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 will 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 part1
after registrationpage if (loadvalue(username, "group") = "control") goto part2
The above 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 Example 1 below.
Example 1
show registrationpage
after registrationpage if (loadvalue(username, "group") = "intervention") goto part1
after registrationpage if (loadvalue(username, "group") = "control") goto part2
after registrationpage if (randomnumber (0,1) = 0) goto part2
• This is the command that randomises end-users into one of two groups and then sends them onto the right page. After the end-users have moved past the registrationpage, they will be automatically assigned to one of two groups using the command randomnumber (0,1). Those in the 0 group will be sent to the section that has been labelled part2. Those in the 1 group will simply go to the next page in the logic.
NB: It is important that you do not repeat the above logic command [randomnumber (0,1) = 0] for part1 because this will not split the groups evenly. If end-users are not randomised to the number 0, they will be randomised to the number 1.
begin part1
show page1
savevalue(username, "group", "intervention")
• Saves the name of the group as intervention
show page2
show page3
show page4
end
• 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.
begin part2
show page10
savevalue(username, "group", "control")
• Saves the name of the group as control.
show page11
show page12
show page13
end
• end finished the section.
show lastpage
• This is the last page, which both groups will see.