0

I am using oTree and want to publish my MTurk experiment with Turkprime (Cloudresearch).

I want the external link to contain the Mturk workerId . However, I want the workerId be called participant_label.

How is that possible?

I already tried

https://www.example.com/room/room2/?particpant_label=workerId
https://www.example.com/room/room2/?particpant_label=?workerId
https://www.example.com/room/room2/?particpant_label=WORKERID

Poza
  • 336
  • 1
  • 16
  • 1
    you can see how I deal with Cloudresearch ids here: https://github.com/chapkovski/cloudtester/blob/main/cloudcapturer/views.py – Philipp Chapkovski Jan 29 '21 at 14:09
  • That looks amazing. Thank you. Could you maybe also specify how to implement that correctly? – Poza Jan 29 '21 at 14:35
  • 1
    This code for each session in oTree creates an 'entrance' url for cloud workers. looking like: www. your_web_site.com/cloud/SESSION_CODE. (of course SESSION_CODE and web_site_name are yours). and you plug this link to the cloudresearch template, and when they access it it correctly passes all the params back to oTree – Philipp Chapkovski Jan 29 '21 at 14:50
  • The redirecting works perfectly! Thank you so much for the code and the clarification. I just copied the app into my project and added `EXTENSION_APPS = ['cloudcapturer']` to my settings. However, cookies are still set when opening the link. Did I miss something in the code that unsets cookies or is that not possible? – Poza Jan 29 '21 at 16:37
  • Why do you want to unset them? – Philipp Chapkovski Jan 29 '21 at 16:39
  • I promised our ethics committee to avoid cookies. – Poza Jan 29 '21 at 16:51
  • 1
    I’m from the phone now, so can’t immediately provide a solution but as far as I remember you just need to switch off csrf and change the middleware from SessionMiddlrware – Philipp Chapkovski Jan 29 '21 at 17:02
  • 1
    I think the simplest would be to use a no_cookies decorator for the parent Page in otree from here: https://pypi.org/project/django-cookieless/ – Philipp Chapkovski Jan 30 '21 at 08:46
  • I must admit that I'm a bit too noobie to solve that on my own. But it's a good idea to split the question into two different ones. Thank you so much for everything, Philipp. The second part of the question is here: https://stackoverflow.com/questions/65969643/disable-all-cookies-in-otree – Poza Jan 30 '21 at 15:19

0 Answers0