Connecting to SONA

Just a quick guide after getting a working example going with Wakefield

It’s very similar to linking to a Pavlovia study with the below exceptions:

When you add the survey link to SONA you need to end it with &participant=%SURVEY_CODE% (SONA will tell you to use ?participant=%SURVEY_CODE%, but there is already a ? in the URL)

Then in your Settings on Pavlovia Surveys go to “Survey Complete” and then “Navigate to URL”.

Paste in your redirect URL from SONA and change the end fro &survey_code=XXXX to &survey_code={participant}

Thanks again to Wakefield for showing me the correct code changes


Very well done to both of you and thanks for posting these instructions @Jdigg & @wakecarter

1 Like

May I suggest a different way to do it? Or more accurately, extend the solution provided above?

I suspect, please correct me if I got it wrong, if someone disagrees in the consent form they will still get the credit
My approach:
First, if someone disagrees in the consent form I hide every subsequent page - this was done from within each page’s settings, not from the logic tab as the latter does not seem to offer the functionality I need.

Then in the Survey Complete tab, I use the Dynamic URL. In the example below:

  1. In the Expression field I entered a condition which actually means if the P agrees in the consent form.
  2. In the Service URL I tyep the URL that will redirect complete Ps - here it’s the BBC news website but it needs the SONA URL as described in the post above.
  3. The top field (Dynamic URL) will be auto-populated.

In other words, if someone agrees and completes the survey in full they will get the credit. Otherwise they will see the default end of survey message and they will not receive credit.


When you do this, are you getting the “click Leave to continue” issue?

I am afraid it’s still an issue. This, I believe, is a browser, not surveyjs pop up.

But it should be bypassable in the backend

A “dirty” trick is to use “Dynamic Survey Complete page markup”.

This way, what final page a P sees depends on if they agreed in the consent or not and as a secondary condition for those who agreed, if they answered the last question (i.e. they completed the survey in full)

In the HTML markup field for those who completed the survey in full can have the following:
click here to get your credit