How to stop users from being randomised twice

From Lifeguide Wiki
Jump to: navigation, 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 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

• If end-users click on the browser back button just after they have been randomised, they will be taken to the registrationpage. When they click Next, the 2 lines of logic above will send them to part1 or part2, depending on which group they were randomised to.

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 and taken automatically to part1 as it is the next line in the logic.

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 have already been sent to part2.

• It is important for part1 to come before part2 because the randomisation logic above will take 50% of end-users directly to part2, and send the other 50% to the next line of logic, which is part1.

• 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 if there is a Jump button on page10 and a Next button on page13.