Howdy, Stranger!

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

Supported by

Adding url parameters to study link


I am trying to embed a study created with lab.js and hosted on our server with JATOS into Qualtrics. I need to send information from the Qualtrics survey to the study and wanted to do this via url parameters. The problem is that something deletes the added parameters from the url, e.g. the url ".../jatos/publix/56/start?batchId=56&generalMultiple&paramA=123&paramB=456" turns into something like ".../jatos/publix/56/72/start?srid=336" when called from Qualtrics (or manually in the browser). The parameters are gone. I also tried other worker types url - same problem. Does anyone have any idea how to fix this?



  • JATOS puts all query parameters into jatos.urlQueryParameters that you can use in your JavaScript.

    So if your URL is ".../jatos/publix/56/start?batchId=56&generalMultiple&paramA=123&paramB=456" you can get the parameters via jatos.urlQueryParameters.paramA and jatos.urlQueryParameters.paramB .



  • Hi Kristian,

    thank you for your swift reply. This worked immediately. The problem was actually in my lab.js script that I tried to call the query parameters with this.state.url.paramA. This call only worked if the url parameters stayed in the url. Replacing this call with jatos.urlQueryParameters.paramA as you suggested did the trick.

    Thank you!


  • Hi @Snow,

    could you tell me where in your lab.js script/study you put the 'jatos.urlQueryParameters' call? Somehow it is not saved in my results...

    And do you happen to redirect your participants back to Qualtrics?

    I'm trying to do that with formr, which should be similar. I would like to simply put the redirect URL in the box in JATOS, but it doesn't seem to work with concatenated strings (I need to feed the url parameter back). Do you have any idea where in the lab.js script exactly I should put one of the options mentioned here:



  • Hi everyone,

    I am struggling with a similar issue with directing and redirecting to an external survey-page.

    I am currently setting up a study in which the participants fill in a survey on an external site (Questback/EFS) and will be directed to tasks on JATOS between questionnaires. The tasks were created with OSWeb.

    To direct and redirect users to external pages, Questback uses URL GET parameters. These are unique for each participant and serve as an identifier during a survey run.

    I have the same issue as @Snow mentioned above: The parameters are not displayed in the URL anymore once the participant is directed to JATOS (and I guess therefore not stored) and the redirect to Questback does not work. (Using the 'End Redirect URL'-Box in JATOS with a placeholder for the parameter value, the questionnaire can be reached but the participant cannot be identified and thus cannot continue with the survey run.)

    I tried to use the information provided by @kri but I am having issues with how and where to modify the JavaScript. I guess that for OSWeb this would be the 'jatos.js' file, but I have too little experience with coding in JavaScript to be able to modify the script correctly.

    As I unterstood it, I need to get the paramterer somehow (as described above using jatos.urlQueryParameters.paramA). But do I also need to implement something to then add the unique parameter value to the URL as well? Would I use the function jatos.endStudyAndRedirect for this?

    Any help would be highly appreciated! ๐Ÿ™‚๐Ÿ™

  • krikri
    edited January 2021

    Hi Elena,

    As I unterstood it, I need to get the paramterer somehow (as described above using jatos.urlQueryParameters.paramA). But do I also need to implement something to then add the unique parameter value to the URL as well? Would I use the function jatos.endStudyAndRedirect for this?

    This is what I would do, yes. You cannot use the  'End Redirect URL'-Box in JATOS since your URL has to be dynamically generated. Your experiment sounds like it roughly has the following layout:

    1. some survey with Questback
    2. redirect to a JATOS study with a General Single/Multiple link while adding a Questback identifier to the URL as a query parameter, e.g. https://my-jatos-domain/publix/123/start?batchId=234&generalSingle&questbackId=12345789  (I made up the name of the Questback parameter - I don't know how Questback is naming them)
    3. When the JATOS study is finished use jatos.endStudyAndRedirect to redirect to Questback. And here you have to generate the URL you want to redirect to and use the Questback identifier that you can get via jatos.urlQueryParameters.questbackId (use the same name as the query parameter as in 2.). I don't know how the URL schema is in Questback but it could look like this: jatos.endStudyAndRedirect("https://questback-domain/somepath/foo?questbackId=" + jatos.urlQueryParameters.questbackId);
    4. some other survey with Questback
    5. redirect again to a JATOS study (probably a different one than before)


    But remember this jatos.endStudyAndRedirect is only available since JATOS version 3.5.1. Before one had to use jatos.endStudyAjax ( in combination with window.location.href.

    Alternatively you can always do everything with JATOS including the surveys.



  • hi,

    I have the same problem, so I use the jatos.urlqueryparameters code for retrieving an ID from qualtrics, but the ID that I try to retrieve from the URL is not saved in the Jatos results. When I check, during running the study in Jatos, if I can retrieve the jatos.urlqueryparameters in my browser window, I can weirdly find the right ID. So how is it possible Jatos doesn't save the ID in the results (the space {} stays blank (url: {}). What is the code you guys used in your lab.js script? thank you in advance

    Kind regards


  • Hi Mrockster,

    Since this seems to be more an issue with lab.js you can also ask in their forum.



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 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