# Getting Prolific IDs through to the data csv file

**URL:** <https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245>\
**Category:** Online experiments\
**Created:** [July 27, 2021, 7:23am UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245 "2021-07-27T07:23:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/lucy/32/10112_2.png) [@Lucy](https://discourse.psychopy.org/u/Lucy)\
**Post date:** [July 27, 2021, 7:23am UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/1 "2021-07-27T07:23:19Z")

</div>

So I am looking to use Wakefield Morys-Carter’s app for passing the Prolific IDs through my experiment on Pavlovia.

I have been reading other questions about this in the forum but I’m still not exactly sure how it works so I just wanted to check.

If my experiment URL is: [https://run.pavlovia.org/Lucy23/spatial\_localisation/html](https://run.pavlovia.org/Lucy23/spatial_localisation/html/)

Would I be right in saying that I send participants to a link that looks like this:

[https://moryscarter.com/vespr/pavlovia.php?domain=run.pavlovia.org&folder=Lucy23/spatial\_localisation/html/a&prolificID={{%PROLIFIC\_PID%}}&studyID={{%STUDY\_ID%}}&sessionID={{%SESSION\_ID%}}](https://moryscarter.com/vespr/pavlovia.php?domain=run.pavlovia.org&folder=Lucy23/spatial_localisation/html/a&prolificID=%7B%7B%25PROLIFIC_PID%25%7D%7D&studyID=%7B%7B%25STUDY_ID%25%7D%7D&sessionID=%7B%7B%25SESSION_ID%25%7D%7D)

Then in my experiment settings (see screen shot) I added variables with the same name as those that I used in the link (OR do I need to create python/JS variables). Does the app then add these to the data output file?

 ![Screenshot 2021-07-27 at 07.57.02](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/4/6/46cc5d4af6fdbdc03c5e7f2406c51e777e35d51d.png)

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [July 27, 2021, 10:00am UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/2 "2021-07-27T10:00:45Z")

</div>

That’s correct, though I got some additions that might be handy:

- The link with this `{{%STUFF%}}` in them is for entry into the Prolific system. It will automatically replace placeholder like `{{%PROLIFIC_PID%}}` with the current participant ID.
- You’ve set up the Experiment Info box correctly, though those placeholders you’ve specified as default values don’t have any meaning to Pavlovia. This means that if, for some strange reason, a value isn’t received from Prolific via the URL, you’ll get the value `{{%STUFF%}}` in your data.
- This demo serves as a step-by-step guide and a testing environment: [Thomas Pronk / demo\_chaining · GitLab](https://gitlab.pavlovia.org/tpronk/demo_chaining)

---

<div class="post-metadata">

**Author:** ![Lucy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/lucy/32/10112_2.png) [@Lucy](https://discourse.psychopy.org/u/Lucy)\
**Post date:** [July 27, 2021, 10:12am UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/3 "2021-07-27T10:12:46Z")

</div>

That’s a great explanation thank you, I will look into the demo chaining

---

<div class="post-metadata">

**Author:** ![Lucy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/lucy/32/10112_2.png) [@Lucy](https://discourse.psychopy.org/u/Lucy)\
**Post date:** [July 27, 2021, 4:29pm UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/4 "2021-07-27T16:29:10Z")

</div>

I’ve been looking through the demo chaining and I’m still a little confused. When you say current participant ID do you mean the ID that hopefully gets passed through Prolific?

Is there a better way storing the Prolific ID so that is meaningful to Pavlovia- I imagine there might not be based on the advice you give in the demo chaining, this is the best way to pass the Prolific ID through.

I initially tried this before posting and it didn’t work properly (it printed {{%PROLIFIC\_PID%}} in my participant column):

 ![Screenshot 2021-07-27 at 17.26.22](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/3/a/3af4545ad797a30a2643f64dffa822c96cfbb47f.jpeg)

I was really trying to wrap my head around how it works today but I’m still not sure.

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [July 27, 2021, 5:11pm UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/5 "2021-07-27T17:11:35Z")

</div>

In the demo, particpant\_id is the Prolific participant UD. Imagine a participant with Prolific ID 123. If you’ve set up Prolific with something like this: `epic_id={{%PROLIFIC_PID%}}`, then Pavlovia receives an expInfo variable named `epic_id` with value `123`

How would you like to make this ID more meaningful to Pavlovia?

---

<div class="post-metadata">

**Author:** ![Lucy](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/lucy/32/10112_2.png) [@Lucy](https://discourse.psychopy.org/u/Lucy)\
**Post date:** [July 27, 2021, 5:26pm UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/6 "2021-07-27T17:26:54Z")

</div>

That does make sense now actually.

I think in terms of making it meaningful to Pavlovia I was thinking as you said with the “STUFF” example that I just want to make sure the variable being printed out does relate to the information I want from Prolific (i.e. the ID that needs to travel from Prolific to Pavlovia). I was wanting to make sure that I did it in the best way possible as it didn’t work last time but I feel more confident from reading your help and the demo. Thanks again.

---

<div class="post-metadata">

**Author:** ![thomas\_pronk](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/thomas_pronk/32/9531_2.png) [@thomas\_pronk](https://discourse.psychopy.org/u/thomas_pronk)\
**Post date:** [July 30, 2021, 2:08pm UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/7 "2021-07-30T14:08:55Z")

</div>

Happy to read it helped you sort it out!

---

<div class="post-metadata">

**Author:** ![juletzky](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/juletzky/32/40540_2.png) [@juletzky](https://discourse.psychopy.org/u/juletzky)\
**Post date:** [August 7, 2024, 2:52pm UTC](https://discourse.psychopy.org/t/getting-prolific-ids-through-to-the-data-csv-file/24245/8 "2024-08-07T14:52:27Z")

</div>

Hi, a bit of a late addition but I was trying to do the same and also ran into problems like @Lucy described in the replies. I followed all steps like they were described above. The Prolific ID was not transferred to Pavlovia and it instead printed {{%PROLIFIC\_PID%}}.

I have found the reason for this now and thought it would be good to share in case someone else runs into problems. The tool by Wakefield Morys-Carter apparently does not accept any url parameters, but just those that are indicated on the website ( **id** , **group** , **session** , **surveyId** , and **researcher** ). It’s important to set up the url parameters with these in mind. So for example, the study link has to look like this: [https://moryscarter.com/vespr/pavlovia.php?folder=yourname&experiment=yourexperiment&id=123test&surveyId=456test&session=456test](https://moryscarter.com/vespr/pavlovia.php?folder=yourname&experiment=yourexperiment&id=123test&surveyId=456test&session=456test)

I hope this helps!
