winteram / IAT

Online IAT
MIT License
42 stars 48 forks source link

embedding in surveys #6

Open thomasschubert opened 11 years ago

thomasschubert commented 11 years ago

Hi there,

how have you been embedding this into larger surveys? I work with somebody who wants to embed this into a larger qualtrics survey. I imagine the best way would be to link out from qualtrics, open a new window, and load the iat in it. Then, the question would be how to link the datasets automatically. I looked into the code - the random number comes from initialize() in IAT.js. So perhaps one could change the code there so that it takes the number from the URL, e.g. something like www.server.com/IAT/index.php?id=1111 - and then submit this form automatically? have you done something like this in the past?

thanks, thomas

nolach commented 11 years ago

Hi Thomas,

Thanks for asking an important question the present code does not address. If I were trying to embed this IAT into a larger survey, I would take the following into consideration:

Matching Subject Codes

To insure the code used in the larger survey matches that in the IAT, pass the subject ID as a GET variable to iat.php (e.g. index.php?code=xxxx). This value can be recovered using the location.search property. Then, change line 21 of iat.js to set the value of #subID to the participant code.

Linking Datasets

The process of linking data sets would vary with the implementation of the larger survey. Although I am not familiar with Qualtrics, I imagine it might be simpler to store the IAT data separately (identified by subject code) on your server. The IAT data could then be merged with the larger data set based on a match of subject codes.

For a more specific answer, I would need further details:

If you have any more questions, feel free to ask!

thomasschubert commented 11 years ago

great, thanks for the reply. I forked and implemented this. the saving of the IAT data is not changed. It would be easy to forward the computed effect to qualtrics, but we don't need this now.

We decided to chain the IAT in between separate qualtrics surveys, and to always forward the participantID from one part to the next (see http://reactiontimes.wordpress.com/2013/04/26/forwarding-data-from-one-qualtrics-survey-to-the-next/)

This also includes that the browser automatically forwards back to a qualtrics URL after the last page of the IAT. For this, I created a new property in input.txt, nextURL, to which the subID is appended. However, I did not change the experimenter.php, so this has to be edited in by hand after creating the IAT for now.

nolach commented 11 years ago

Awesome work, Thomas! If you want to submit a pull request for your fork, we can integrate your changes into the GUI experimenter interface for researchers without coding knowledge.

thomasschubert commented 11 years ago

I am a total newbie with github... what is a pull request? how would this work? because i changed some of your files and the now work differently


Thomas Schubert schubert@igroup.org

Am 30.05.2013 um 17:50 schrieb Steven Allon notifications@github.com:

Awesome work, Thomas! If you want to submit a pull request for your fork, we can integrate your changes into the GUI experimenter interface for researchers without coding knowledge.

— Reply to this email directly or view it on GitHub.

nolach commented 11 years ago

A pull request is a request to merge the changes you made in your fork with the master branch. They are useful because they allow integration of novel code from open-source contributors. Since your code closely mirrors the present state of the master branch, it would be simple to integrate your changes into the GUI interface. This back-and-forth between master/forks allows many contributors to work on a project simultaneously and contribute unique features.

To send a pull request, go to your repository homepage (https://github.com/thomasschubert/IAT) and click "Pull Request." GitHub will then guide you through the process. After submission, the owner of the master branch (winteram) can accept your request and sync changed files.

thomasschubert commented 11 years ago

ok, I did that. see the text in the pull request re the changes in this version.

thomasschubert commented 11 years ago

After some more thinking, I closed the pull request again. Let me try first to make some changes that would fold the two versions into one, so that the same files can be used either stand alone (as before) or chained in between other surveys.