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 part2.
• The last page in part1 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 in the intervention group will go straight into the section for the control 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.