homeaboutblogcontact

Passing Data from Qualtrics to oTree

06 May, 2020 - 1 min read

I am a big fan of using oTree for running behavioral experiments online and locally in the lab. Sometimes I have a Qualtrics survey that I want to transition into an oTree application. This brief tutorial will show you how to easily match data between the two.

First, we will need a unique participant identifier. I am almost always using CloudResearch for recruitment on Amazon Mturk, so I just use the recommended workerId embedded field:

embedded

This is just any given mturker's user ID. Next, we are going to set up the survey to redirect to a different URL. Click on Survey Options and look for a redirect option under the Survey Termination area.

options

Here, we are going to make use of Qualtrics' Query Strings functionality. We will append our application's heroku URL with a query string to pass along our workerId embedded variable to oTree's participant_label. Like so:


myApplication.herokuapp.com/room/myRoom/?participant_label=${e://Field/workerId}


Now, when we export the data from oTree, we can merge the Qualtrics data and oTree data using participant_label!

© 2020, Built with Gatsby