Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Integration with Sona?

JATOS now works with AMT and Prolific. Any plan for integrating JATOS with Sona (http://www.sona-systems.com)?

Comments

  • Hi nya,

    yes, it's on our todo list. I haven't looked into Sona in detail but I have a hunch that it works already with JATOS and that JATOS doesn't need to be changed for this. It looks like Sona just needs the study link URL from JATOS (similar to Prolific with JATOS: http://www.jatos.org/Use-Prolific.html). But I have to check this and write some documentation.

    Best,

    Kristian

  • We are trying to resolve this too. We can pass the sona participant id to jatos by adding &id=%SURVEY_CODE% to the study URL, and if we have an inline javascript entry that says:

    vars.subject_nr = jatos.urlQueryParameters.id

    the id is happily recorded in the subject_nr variable in the logged data.

    What we cannot do is pass the id back to sona to award credit.

    When we try to append the id to the return url with this:

    jatos.endStudyAndRedirect('https://uopsop.sona-systems.com/services/SonaAPI.svc/WebstudyCredit?experiment_id=3963&credit_token=72fb455fe0d0414cbf6c93433559a08c&survey_code=''+jatos.urlQueryParameters.id)

    then JATOS gives us 'Uncaught SyntaxError: Invalid or unexpected token' and advises us to look in the console, where it says FAIL. The Study Log thinks it all finished fine though, and the results data is there.

    (It does not work if we try to append vars.subject_nr either).

  • The lack of a closing semicolon on the final line has just been pointed out.... and the mismatched quotes. This works:

    jatos.endStudyAndRedirect('https://uopsop.sona-systems.com/services/SonaAPI.svc/WebstudyCredit?experiment_id=3963&credit_token=72fb455fe0d0414cbf6c93433559a08c&survey_code='"+jatos.urlQueryParameters.id);

  • So, you got Sona + JATOS working for you!?

  • yes - first participant has signed up through sona, completed task, and received credit!

  • Nice :)

  • @jmplym Thanks, I was looking for a way to do this myself, actually.

    Buy Me A Coffee

  • edited March 2021

    great -, thanks! I'm now embedding these lines within a try/catch statement so that if there are no URL parameters supplied it (e.g., if used locally) it does not crash:

    try{
            vars.participant_URL_ID = jatos.urlQueryParameters.id
            } 
    catch(e){
            vars.participant_URL_ID = 0
            }
    


    and then at the end, for robustness:

    try{
         jatos.endStudyAndRedirect("https://uopsop.sona-systems.com/webstudy_credit.aspx?experiment_id=xxxx&credit_token=xxxxxxxxxxxxxxxxxxxxxxx&survey_code=" + vars.participant_URL_ID);
         } 
    catch(e){}
    


    Of course, there should always be an id, even if it is zero, so the error should never fire, and if there is no id supplied then the participant ends up at a confused SONA page which says it has never heard of them, but that is immaterial. You could revise that second line to send them somewhere else in the final catch(e){} if you wanted to be nicer.

  • Hi @jmplym and @kri ,

    I found out that this solution, i.e. explicitly calling jatos.endStudyAndRedirect() , has the unfortunate side-effect of bypassing the data transfer that happens at the end of the experiment. Data is also stored incrementally, every time that a logger item is called, but this is not foolproof. Therefore, at the end of the experiment all data is sent again, and this also includes some additional 'context' information. And this is missing now, because jatos.endStudyAndRedirect() closes the study prematurely.

    Have you run into this as well, and perhaps have a workaround?

    — Sebastiaan

    Buy Me A Coffee

  • Hi Sebastian,

    jatos.endStudyAndRedirect() shouldn't close the study prematurely but I'm not sure what you mean with 'bypassing the data transfer that happens at the end of the experiment'. But jatos.js ensures that everything you send via jatos.submitResultData or jatos.appendResultData before calling jatos.endStudyAndRedirect() is actually sent.

    E.g.

    jatos.appendResultData("one");
    jatos.appendResultData("two");
    jatos.endStudyAndRedirect("https://www.myredirect.url")
    jatos.appendResultData("three");
    

    ensures that "one" and "two" are stored in JATOS database before the redirect happens. "three" is likely lost.

    Best,

    Kristian

  • Hi @kri ,

    The reason that things go wrong (if I'm correct) is that jatos.endStudyAndRedirect() is executed in an inline_javascript item that is part of the experiment. And once this function is called, the connection with JATOS is over, right? That's why in your example the "three" would be lost. In the case of OSWeb, this means that the call to jatos.submitResultData() , which happens after the experiment has ended and therefore after the call to jatos.endStudyAndRedirect() , doesn't have any effect anymore.

    All of this makes perfect sense, and it's not a bug in JATOS or OSWeb as such. But it makes it problematic to automatically grant credit to SONA participants and have the experiment end gracefully at the same time. Hence my nudge in the issue tracker ;-)

    Or am I missing something?

    -- Sebastiaan

    Buy Me A Coffee

  • @sebastiaan , I have not had any problems losing data. Maybe my loggers are doing their job and whatever the 'final data transfer' you need is not relevant to my studies. I do not need the context information so don't ask for it when using Opensesame to translate the json file to csv; if it isn't there I have not notice.! I do remember that trying to read the json file directly in R using jsonlite failed so maybe it isn't terminated properly and Opensesame is able to cope with this.

    The only problem is when participants get to the debriefing screen and then close their browser window before the study actually finishes, in which case I have all their data but the survey_code id is not returned to sona and they don't get their credit. I have to compare id numbers in my jatos data against my sign-up list and manually credit these few.

  • @sebastiaan Anyway, issue https://github.com/JATOS/JATOS/issues/224 shouldn't be too difficult to implement and it might be nice to have for other things too.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games