@@ -233,6 +233,111 @@ htt?ps://exps.gureckislab.org/e/note-useless-uncle#/welcome/mturk/assignmentId=1
233233which loads slightly different content. You can customize aspects of this via
234234the ` recruitment/MTurkRecruitPage.vue ` component.
235235
236+ ## SONA
237+
238+ [ SONA Systems] ( https://www.sona-systems.com ) is a participant management
239+ platform commonly used at universities for recruiting research participants from
240+ subject pools. Participants typically receive course credit for their
241+ participation, though SONA also supports paid studies.
242+
243+ <SmileText /> supports both ** SONA (credit)** and ** SONA (paid)** as recruitment
244+ services.
245+
246+ ### Configuration
247+
248+ SONA requires several environment variables to be set in your ` env/.env.local `
249+ file. You will need to obtain these values from your SONA administrator or from
250+ your SONA experiment settings page.
251+
252+ ```
253+ # sona (credit)
254+ VITE_SONA_URL = 'https://yourschool.sona-systems.com'
255+ VITE_SONA_EXPERIMENT_ID = 'your_experiment_id'
256+ VITE_SONA_CREDIT_TOKEN = 'your_credit_token'
257+
258+ # sona (paid)
259+ VITE_SONA_PAID_URL = 'https://yourschool.sona-systems.com'
260+ VITE_SONA_PAID_EXPERIMENT_ID = 'your_experiment_id'
261+ VITE_SONA_PAID_CREDIT_TOKEN = 'your_credit_token'
262+ ```
263+
264+ You only need to fill in the set that matches your study type (credit or paid).
265+ After updating these values, run ` npm run upload_config ` to sync them to GitHub
266+ for deployment.
267+
268+ - ` VITE_SONA_URL ` / ` VITE_SONA_PAID_URL ` is the base URL of your institution's
269+ SONA instance (e.g., ` https://yourschool.sona-systems.com ` )
270+ - ` VITE_SONA_EXPERIMENT_ID ` / ` VITE_SONA_PAID_EXPERIMENT_ID ` is the experiment
271+ ID assigned by SONA when you create the study
272+ - ` VITE_SONA_CREDIT_TOKEN ` / ` VITE_SONA_PAID_CREDIT_TOKEN ` is the
273+ authentication token SONA provides for automatic credit/payment granting via
274+ web studies
275+
276+ ### Setting up your study URL in SONA
277+
278+ When creating a web study in SONA, you need to provide the study URL. SONA will
279+ append a ` survey_code ` parameter that identifies each participant. Your study URL
280+ should follow this pattern:
281+
282+ For credit-based studies:
283+ ```
284+ https://exps.gureckislab.org/e/note-useless-uncle/#/welcome/sona/?survey_code=%SURVEY_CODE%
285+ ```
286+
287+ For paid studies:
288+ ```
289+ https://exps.gureckislab.org/e/note-useless-uncle/#/welcome/sona_paid/?survey_code=%SURVEY_CODE%
290+ ```
291+
292+ Replace ` note-useless-uncle ` with your project's code name. The ` %SURVEY_CODE% `
293+ placeholder is automatically replaced by SONA with the participant's unique
294+ survey code.
295+
296+ ### Informed consent for unpaid studies
297+
298+ SONA credit-based studies are unpaid, so the default informed consent language
299+ about monetary payment is inappropriate. To show course-credit-appropriate
300+ consent language, set the ` unpaidStudy ` runtime config option in your
301+ ` design.js ` :
302+
303+ ``` js
304+ api .setRuntimeConfig (' unpaidStudy' , true )
305+ ```
306+
307+ This changes the compensation bullet in the default ` InformedConsentText.vue `
308+ from payment language to course credit language. See the
309+ [ configuration docs] ( /coding/configuration ) for more on runtime config. You can
310+ also toggle this setting in the developer tools sidebar using the "Unpaid"
311+ switch.
312+
313+ ::: tip
314+ The ` unpaidStudy ` option is not specific to SONA — it can be used for any
315+ recruitment service where participants are not paid (e.g., citizen science
316+ studies).
317+ :::
318+
319+ ### How completion works
320+
321+ When a participant finishes the study, the thanks page automatically provides a
322+ button that redirects them back to SONA. This redirect URL includes the
323+ participant's survey code and your credit/payment token, so SONA can
324+ automatically grant credit or payment without any manual intervention.
325+
326+ For credit studies, the redirect goes to:
327+ ```
328+ {SONA_URL}/webstudy_credit.aspx?experiment_id={ID}&credit_token={TOKEN}&survey_code={CODE}
329+ ```
330+
331+ This means participants are credited immediately upon clicking the button — no
332+ completion codes to copy and paste.
333+
334+ ### Testing in developer mode
335+
336+ In the developer tools sidebar, you can select "sona" or "sona_paid" from the
337+ ** Service** dropdown to simulate SONA recruitment during development. This lets
338+ you test the full flow including the thanks/credit page without needing an
339+ actual SONA participant.
340+
236341## Crowd-sourcing
237342
238343In the future the lab might make a citizen science recruitment portal. To
0 commit comments