Treatment specific link (URL) to join

42 views
Skip to first unread message

Peter Cock

unread,
Aug 24, 2021, 10:01:29 AM8/24/21
to oTree help & discussion
Hello all,

We are planning a game with multiple treatments (currently just two, so a BooleanField) which are fixed for each participant for the entire game. I would like to be able to setup two different URLs which we can share with our participants assigning them to have this field either True or False.

i.e. Decide outside of oTree which group of people gets the first URL and treatment one, and which group of people get the second URL and treatment two.

Should I be running this as two sessions (both live at the same time), and expose the treatment field via SESSION_CONFIGS?


i.e. Manually create the first session for X players with treatment one, and a second session with Y players and treatment two. Then share the session specific URLs with the relevant people to invite them into oTree.

Thank you,

Peter

Chris @ oTree

unread,
Aug 24, 2021, 10:08:21 AM8/24/21
to oTree help & discussion
Creating 2 sessions is fine. If you need it to be 1 session, and you are using participant labels, then you can use this technique, in combination with assigning the treatments in creating_session also:

Peter Cock

unread,
Aug 24, 2021, 10:36:32 AM8/24/21
to oTree help & discussion
Thank you, we'll try two parallel sessions then.

I had guessed it would be possible using participant labels, but hope to avoid the manual setup in sharing personalised links with dozens of participants.

Peter

Peter Cock

unread,
Aug 24, 2021, 11:48:08 AM8/24/21
to oTree help & discussion
Hi Chris,

Using two parallel sessions for the two different treatments seems to be working nicely in my development environment, code here for anyone interested:

https://github.com/peterjc/MDT-INTR-EXP-MET/commit/c65add5495f915a2d4315d619ed08ad630ee2707

We'll need to do a larger test on Heroku before trying this live of course.

Thank you again,

Peter

Reply all
Reply to author
Forward
0 new messages