External Study Credit Granting with oTree

While these instructions refer to “credit granting”, they work for both credit and paid studies. For paid studies, participation will be marked (instead of credit granted) just like with any other paid study.

Here are the basic steps, which are subject to change (since the product is controlled by oTree):

1. On your Sona Systems site, change the Study URL so it includes ?participant_label=%SURVEY_CODE% in the URL.

So if the oTree URL is:
https://otree.yourschool.edu/room/my_room_name/

Then change it to:
https://otree.yourschool.edu/room/my_room_name/?participant_label=%SURVEY_CODE%

2. In oTree set-up, configure the last page of the room to go back to your Sona system. See example return here. The URL to use would be similar to:

“https://yourschool.sona-systems.com/webstudy_credit.aspx?experiment_id=123&credit_token=4e48f9b638a&survey_code=”+ str(sona_id).

In order to get an example of this URL, login to Sona and go to your Study information. Pull the client side URL from here:

Then the HTML Template block might have this to redirect to the above URL to grant credit:

This page is a reference post used in the creation of the above. These features are described on oTree’s site at the following URL:

(“Participant Labels”) https://otree.readthedocs.io/en/latest/admin.html?highlight=participant_label#participant-labels