# Qualtrics to Psychopy back to Qualtrics

**URL:** <https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617>\
**Category:** Online experiments\
**Created:** [February 23, 2022, 4:54pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617 "2022-02-23T16:54:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 23, 2022, 4:54pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/1 "2022-02-23T16:54:39Z")

</div>

Sorry I am a complete newbie at psychopy/pavlovia. I have create a survey in Qualtrics which randomly assigns a participant ID, but would response ID work better if the data can be transferred from pavlovia to qualtrics? I am aiming to then embed the Pavlovia link with in qualtrics. I have seen that people are able to transfer the participant ID from Qualtrics to Pavlovia, but I was wondering if I can then do it back from pavlovia to Qualtrics where participants can see the debrief.  
I was also hoping if it was possible to transfer the data from the pavlovia experiment to Qualtrics when participants view the debrief, which would the store all the experiment data on Qualtrics so I am not manually having to pair the qualtrics data to the corresponding pavlovia data.  
Is this possible? If so, would someone be able to give me step by step instructions?  
I am currently waiting for the psychopy experiment to be uploaded to pavlovia, but it would be nice to know before hand if this is possible and what to do.

I hope this makes sense! I am completely new to all the custom URL and embedding.

Thank you  
Chelsea

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [February 23, 2022, 6:01pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/2 "2022-02-23T18:01:14Z")

</div>

Hi Chelsea,

What do you have in Qualtrics apart from your participant information, demographics and debrief?

If that’s about it, then I now use my [VESPR Study Portal](https://discourse.psychopy.org/t/new-web-app-vespr-study-portal/22251) for this instead.

It’s not possible to send all of the Pavlovia data to Qualtrics so I pair data (based on ResponseID or session from my portal) when I need extensive data from both platforms.

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 23, 2022, 9:08pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/3 "2022-02-23T21:08:07Z")

</div>

Theres also the Hexad player user type survey, emotion regulation survey and the attentional control scale survey.

Theres no way to bring the reaction time data over from pavlovia to qualtrics then? If not, is it possible to have step by step instructions of how to embed the link and move from qualtrics to pavlovia and back to qualtrics, as well as how to keep a track of the participant numbers? I have studied the other threads about this, but I am so confused on what all the URL things mean.

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 24, 2022, 9:43am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/4 "2022-02-24T09:43:48Z")

</div>

Id just like to add aswell that I am using the simple reaction time task in Pavlovia.

---

<div class="post-metadata">

**Author:** ![pavle](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/pavle/32/8641_2.png) [@pavle](https://discourse.psychopy.org/u/pavle)\
**Post date:** [February 24, 2022, 10:18am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/5 "2022-02-24T10:18:34Z")

</div>

@Chelsea send me a message, I can walk you through the process as I have done this several times over for my own study.

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 24, 2022, 10:45am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/7 "2022-02-24T10:45:14Z")

</div>

Thank you! I am having an utter noob moment and cant seem to find the message icon on your profile.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [February 24, 2022, 11:25am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/8 "2022-02-24T11:25:51Z")

</div>

If you want to just send summary data (e.g. mean RT) to Qualtrics then you can do that via a URL variable by using **psychoJS.setRedirectUrls(myCompletedURL, myCancelledURL)** to add the variable and value.

> [@CompletedURL / IncompleteURL](https://discourse.psychopy.org/t/completedurl-incompleteurl/5597/23):
>
> Yes, the issue is that the call to redirect to this URL is pre-scheduled at the top of the study and, at that point, your variable doesn’t exist. There is a function in psychojs setRedirectUrls that you could use though in a code component. I think you’d just need to add something like this to your study after you’ve chosen the URL the redirect should point to: PsychoJS.setRedirectUrls(myCompletedURL, myCancelledURL) Note that this function doesn’t perform the redirect. It simply determines w…

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 24, 2022, 11:50am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/9 "2022-02-24T11:50:16Z")

</div>

And that will do the mean/average RTT for each participant?  
I am still really confused on how the custom URL works / how to know which goes where and how to add that to qualtrics to get to pavlovia and then pavlovia back to qualtrics.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [February 24, 2022, 11:55am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/10 "2022-02-24T11:55:11Z")

</div>

I’m planning to create a video tutorial on this topic over the next few days, possibly with the example Prolific → VESPR Study Portal → Pavlovia → Qualtrics → VESPR Study Portal → Prolific

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 24, 2022, 12:08pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/11 "2022-02-24T12:08:03Z")

</div>

Would this cover the custom URL? Where would this video be to access?

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 24, 2022, 8:20pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/12 "2022-02-24T20:20:33Z")

</div>

Id also like to add that for the reaction time task there is a practise run. Would the means URL also copy in the data from that or is there a way to get psychopy/pavlovia not to record the practise run?  
Sorry for all the questions!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [February 24, 2022, 9:39pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/13 "2022-02-24T21:39:26Z")

</div>

I’ll post the link (which will probably be on YouTube) to this thread.

I’d rather focus on passing variables through unchanged in an initial video.

You can’t send all the data via URL variables,

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [February 24, 2022, 10:00pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/14 "2022-02-24T22:00:28Z")

</div>

So I can specifically use the URL to send the mean reaction time of the actual task and not the practise run?

I look foward to watching the video, im sure itll help immensely!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [March 2, 2022, 10:12pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/15 "2022-03-02T22:12:27Z")

</div>

Hi

I recorded a video today. Please let me know if you find it helpful.

[![](https://img.youtube.com/vi/WpTjVQH-jzw/maxresdefault.jpg "Daisy Chaining Online") ](https://www.youtube.com/watch?v=WpTjVQH-jzw)

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [March 3, 2022, 9:37am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/16 "2022-03-03T09:37:02Z")

</div>

That definitely helps - Ill probably be able to get my head around it a bit more once the task is uploaded to Pavlovia.  
I do still have a few questions though:

1. In Qualtrics the participants have a random number generated for their ID, which is in the embedded survey flow. Will I be able to take this to Pavlovia and back?
2. How will Pavlovia automatically record the average reaction time from the task (The Simple Reaction Time Task), and what will the variable be called to transfer over through the URL? Or will I have to transfer all of the reaction time data through? Keep in mind they do a short practise of the reaction time task, in which I do not want the reaction times recording.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [March 3, 2022, 10:09am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/17 "2022-03-03T10:09:06Z")

</div>

If you are starting in Qualtrics then you could set participant to your random ID and session to ResponseID (a unique Qualtrics variable you can add - see slide 38 of  
[Qualtrics Primer - Google Slides](https://docs.google.com/presentation/d/e/2PACX-1vShEbK65azEWNKDoT4Z8n9raYYg_1Ael0-jHNyiIm7o9_PvBRVTE7w7fOb7WFC_moqaALa6qhxQ_Hcy/pub?start=false&loop=false&delayms=10000&slide=id.gc621c637ef_0_33))

The key to your second question is to calculate an average reaction time in PsychoPy (for example by appending the RTs to a list and then calculating the mean at the end of the experiment). You then need to modify the completed URL using psychoJS.setRedirectUrls()

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [March 3, 2022, 10:13am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/18 "2022-03-03T10:13:10Z")

</div>

Awesome thank you! In regards to the mean and list, how is it possible to do that in psychopy/pavlovia? Sorry for all the questions, Pavlovia and Psychopy do not get on well with me!

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [March 14, 2022, 11:40am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/19 "2022-03-14T11:40:17Z")

</div>

I am still having some issues with psychopy. I have imported an already made Simple Reaction Time Task (by Deary & Liewald, 2011) into psychopy, but it does not look to be measuring in milliseconds on the excel data sheet…nor do I understand which is the actual reaction times and if an average is being generated. If an average is not being generated, I am still very confused on how to add this in the builder from what you have said above. Any help would be much appreciated, this is for my Masters degree.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [March 14, 2022, 11:57am UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/20 "2022-03-14T11:57:22Z")

</div>

By default, reaction times are in seconds.

What I’ve done recently for a Stroop task is:

Begin Experiment in JS only code

```auto
median = function (values){
  if(values.length ===0) return 0;

  values.sort(function(a,b){
    return a-b;
  });

  var half = Math.floor(values.length / 2);

  if (values.length % 2)
    return values[half];

  return (values[half - 1] + values[half]) / 2.0;
}

```

Begin Routine (before trials loop)

```auto
rtListI=[]
rtListC=[]

```

End Routine in trial routine

```auto
if Response.corr == 1 or Score == 1:
    block_results[thisBlock[2]*2+thisCondition][1]+=1
    if thisCondition == 1:
        rtListC.append(round(t*1000)-500)
    else:
        rtListI.append(round(t*1000)-500)

```

Begin Routine (at end of block)

```auto
weblink='https://brookeshls.co1.qualtrics.com/jfe/form/qualtrics/?'
weblink=weblink+'participant='+expInfo['participant']+'&session='+expInfo['session']
weblink=weblink+'&rtc1='+median(rtListI)+'&rtc2='+median(rtListC)
psychoJS.setRedirectUrls(weblink, 'https://moryscarter.com/vespr/portal/')

```

---

<div class="post-metadata">

**Author:** ![Chelsea](https://avatars.discourse-cdn.com/v4/letter/c/a3d4f5/32.png) [@Chelsea](https://discourse.psychopy.org/u/Chelsea)\
**Post date:** [March 14, 2022, 12:14pm UTC](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617/21 "2022-03-14T12:14:17Z")

</div>

Is there any way to change it to milliseconds in the psychopy builder? My knowledge of coding is non-existent.

[Next page](https://discourse.psychopy.org/t/qualtrics-to-psychopy-back-to-qualtrics/27617.md?page=2)
