← Documentation

Prolific Integration

Connect oTree experiments to Prolific — from study creation to bonus payments.

Overview

TreeHost's Prolific integration handles the key steps of running a Prolific study — from draft to completion — without leaving your dashboard. The standout feature is automatic wiring: TreeHost connects your oTree workspace to your Prolific study with no URL copying, code changes, or redeployment.

What happens automatically

When you create and publish a Prolific study through TreeHost, the following are set up for you without any manual steps:

  • Completion redirect — A redirect page is appended to the end of every session. When participants finish your experiment, they are automatically sent to Prolific to record their completion. No changes to your oTree code required.
  • Auto-advance on last page — If your last app page has no Next button (e.g. a read-only Results page), TreeHost adds a 5-second countdown ("Redirecting in…") that automatically advances participants to the redirect. If your page already has a Next button, participants click it as normal — the timer is not added.
  • Prolific ID parameter — The PROLIFIC_PID URL parameter is configured, linking each participant's Prolific ID to their oTree data.
  • oTree room — A dedicated room is created in your oTree workspace for Prolific participants.
  • oTree session — A session is launched in that room, sized to your participant count, ready for participants to join.

What you manage from TreeHost

  • Create and publish Prolific study drafts with key values and certain participant filters
  • Save and reuse study templates — a feature unique to TreeHost
  • Monitor participant progress summary and study status
  • Pay completion bonuses to participants
  • View a full cost breakdown — rewards, bonuses, platform fees, and Tax/VAT

Submission approval is handled on Prolific. After participants complete the study, you review and approve their submissions directly in the Prolific researcher dashboard. TreeHost handles setup, monitoring, and bonuses — not approval.

Prerequisites

Before using the Prolific integration, you need:

  • A Prolific researcher account at prolific.com
  • A Prolific API token (see below)
  • A TreeHost workspace with a running oTree project uploaded

Getting a Prolific API token

  1. Sign in to your Prolific researcher account
  2. Go to Side menu → API tokens
  3. Click Create API token, give it a name (e.g. "TreeHost"), and copy the token

Keep your API token private. It gives full access to your Prolific researcher account including the ability to publish studies and charge your account balance. Never share it or commit it to version control.

Connecting your API token

Your Prolific API token is stored per workspace, not globally. This lets you use different Prolific accounts for different projects if needed.

  1. Open your workspace from the TreeHost dashboard
  2. Click the Prolific button on your workspace card
  3. In the Prolific panel, paste your API token
  4. Click the Connect Prolific button

TreeHost immediately verifies the token against the Prolific API. If the token is valid, the panel shows the Create a new Prolific study form.

Creating a study

Studies are created as drafts first, letting you review all settings on the Prolific website before spending any money.

Study settings

When creating a study, you fill in these key values:

  • Study title — shown to participants in the Prolific study listing
  • Study description — what participants will be doing (be accurate — Prolific reviews this)
  • Estimated duration — expected minutes to complete; used by Prolific to calculate the hourly rate shown to participants
  • Reward per participant — payment per participant in your account's currency
  • Number of participants — total slots to fill
  • oTree Room name — the name of the room in your oTree project
  • oTree session config — the session config from your project to use for this study

Eligibility filters

You can restrict who can participate using Prolific's eligibility filters:

  • Countries — one or more countries of residence
  • Min. approval rate — the minimum approval rate required
  • Age range — minimum and maximum age
  • Fluent in English — participants who speak English fluently

Filters are applied by Prolific at recruitment — only eligible participants will see your study.

The study fields and eligibility filters are subsets of what Prolific offers. After creating a study draft here, you can always edit the full set of fields on the Prolific website.

Study templates — TreeHost unique feature

If you run similar studies repeatedly, you can save a study as a template. When creating a new study, select an existing template to pre-fill all settings. Templates are stored per workspace and are not shared across workspaces.

Drafting and publishing

  1. Come back to the Create a new Prolific study form, shown after connecting your API token
  2. Fill in the study settings and any filters
  3. Click Create draft study — the study is created on Prolific but not yet visible to participants
  4. TreeHost fetches and stores the Prolific redirect URL, completion code, and other necessary information into your TreeHost workspace so you don't need to manually copy and paste these details
  5. Review and edit the full study details on the Prolific website if needed
  6. When ready, click Publish in the Prolific panel — the study goes live and TreeHost automatically wires everything (see below)

Always publish from TreeHost. Clicking Publish on the Prolific website skips the oTree session setup — participants will arrive at an empty room and won't be able to join. If you accidentally publish on Prolific, open the TreeHost Prolific panel and click Publish there; TreeHost will detect that the study is already active and complete the oTree setup automatically.

How auto-wiring works

The most common pain point when running oTree on Prolific is the manual setup: copying the redirect URL from Prolific into your study, adding the Prolific ID parameter to the URL, creating an oTree room, setting a room-specific session, and updating oTree code to read the participant ID. TreeHost does all of this for you at publish time.

What gets configured automatically

Completion URL. Prolific provides a redirect URL that participants must visit to record their completion. TreeHost injects this URL into your oTree project at upload time and appends a hidden _th_completion redirect page to the end of every session. When a participant finishes their last app page, this page fires and sends them to Prolific — no changes to your oTree templates required.

If your last app page has no Next button, TreeHost patches it with a 5-second countdown so participants aren't stranded. They see a "Redirecting in…" timer, then advance automatically. If your last app page already has a Next button, participants click it as usual — the countdown is not added.

Prolific participant ID. Prolific appends ?PROLIFIC_PID=... to the URL it sends participants. TreeHost configures your study to pass this parameter through to oTree, where it is stored as a participant field. Your oTree code can access it via player.participant.prolific_id, but you don't need to do anything for it to be recorded.

oTree room. The room you selected is configured in your oTree workspace. It uses Prolific participant IDs as room labels, ensuring each Prolific participant maps to exactly one oTree participant slot.

oTree session. A session is started in that room using the session config you selected, with the number of participants set to match your Prolific study. Participants join the session by following their Prolific study link — there is no separate oTree session link to distribute.

Do not create sessions or rooms manually in the oTree admin while a study is active. oTree routes new participants to the most recently created session in a room. Creating a session manually will redirect all incoming Prolific participants away from the TreeHost-managed session, breaking participant routing.

The participant flow

  1. Participant accepts and joins the study on Prolific
  2. Prolific sends them to your oTree room URL with their PROLIFIC_PID appended
  3. oTree assigns them to the waiting session
  4. Participant completes the experiment and reaches the last page of your oTree app
  5. They click Next (or a 5-second countdown fires if your last page has no Next button), and oTree advances them to the TreeHost redirect page
  6. The redirect page sends them to Prolific's completion URL
  7. Prolific records their completion and marks the submission as awaiting review or approved according to the study settings

Monitoring your study

The Prolific panel, opened from your workspace card, shows live data about your study. Click Refresh at any time to pull the latest state from Prolific.

Study status

The status badge reflects the current state of your study on Prolific:

  • UNPUBLISHED — draft created but not yet published
  • ACTIVE — live and accepting participants
  • COMPLETED — all slots filled and study closed
  • PAUSED — temporarily paused (can be resumed on Prolific)

Participants section

While a study is active or completed, the panel shows participant counts at each stage:

  • Active — participants currently in your oTree session
  • Awaiting review — submissions completed and waiting for your approval on Prolific
  • Approved — submissions you have approved on Prolific or automatically approved based on study settings
  • Returned / Timed out — participants who left without completing

Approval is done directly in the Prolific researcher dashboard — not through TreeHost.

Refreshing data

Click Refresh in the Prolific panel to pull the latest participant counts, study status, and payment data from Prolific. If the study has transitioned to a new status (e.g. ACTIVE → COMPLETED), the panel will re-render to show the updated layout including the Bonus Payments section.

Understanding costs

The Payment section in the Prolific panel shows a full cost breakdown sourced directly from Prolific. All figures are updated whenever you click Refresh.

Cost table

The table shows four rows:

  • Rewards — total base reward paid to participants (reward per person × participant count)
  • Bonuses — total bonus payments across all channels (TreeHost and Prolific website combined)
  • Prolific fee — platform fee charged by Prolific on rewards and bonuses, based on your account type
  • Tax/VAT — value-added tax, if applicable to your account

The Total row shows the sum of all four.

Before publishing (draft)

Before a study is published, the panel shows an estimated cost based on your reward and participant count settings. The live breakdown becomes available once the study is published and Prolific has processed the charge.

Why use TreeHost for cost tracking? Prolific's own researcher dashboard shows costs at the study level but does not break down rewards vs. bonuses vs. fees in one view. TreeHost's Payment section pulls data from Prolific to give you an accurate, itemised breakdown — including bonuses paid on both sides.

Paying bonuses

Once participants are approved, you can pay additional bonuses at any point while the study is active or after it completes.

How bonuses work

Prolific bonuses are payments made in addition to the base reward. They appear as separate payments in participants' Prolific accounts.

TreeHost's bonus payment flow:

  1. The Bonus Payments section appears once your study is active or completed, and there is at least one approved submission
  2. Click Bonus Payments to expand the section
  3. Enter the bonus amount
  4. All currently approved participants will receive this amount as a bonus after you click Pay Bonuses
  5. Prolific processes the payments; the panel updates to show the total paid and participant count

TreeHost pays the same bonus amount to all currently approved participants. If you need to pay different amounts to different participants, use the Pay Bonus on Prolific button to do so directly on the Prolific website.

Bonus participant count

The panel tracks the number of unique participants who have received a bonus through TreeHost. If you pay the same participant multiple times (e.g. two separate bonus rounds), they are counted as one participant. Bonuses paid directly on Prolific are not included in this count but are included in the total amounts shown in the cost breakdown.

Prolific charges a platform fee and Tax/VAT on bonuses at the same rate as the base reward. The full cost of bonus payments (including fees) is shown in the Payment section.

Troubleshooting

API token not accepted

Copy the token directly from Prolific's API Tokens page to avoid whitespace or truncation. The token is a long string — paste it in full.

Study created but participants can't access oTree

Check that your oTree workspace is in the Running state and that a project has been uploaded. If oTree restarted after the study was published (e.g. due to a project upload), the completion URL and room configuration are re-injected automatically on the next restart — no action needed on your part. If the issue persists, contact support.

Participants reach the last page but Prolific doesn't record their completion

TreeHost automatically appends a _th_completion redirect page to the end of every session. This page fires after all oTree wait pages have resolved and participants reach the end of their last app.

Last page has no Next button: TreeHost adds a 5-second countdown that auto-advances participants. If the countdown is not appearing, re-upload your project so the latest TreeHost injection is applied.

Last page has a Next button: Participants must click it to advance. If they close the browser before clicking, they will not reach the redirect page and Prolific will not record their completion.

oTree wait pages: If your session uses wait pages, confirm they resolve correctly. A wait page that never resolves will block all subsequent pages including the redirect.

If the issue persists after re-uploading your project, contact support with your workspace ID.

Bonus Payments section not showing

The Bonus Payments section appears once a study is ACTIVE or COMPLETED, and there is at least one approved submission. If you've just approved a submission and the section isn't visible, click Refresh — the panel will re-render with the latest study state.

Cost breakdown shows "unavailable"

The accurate cost breakdown is fetched from Prolific and is only available for published studies. For unpublished drafts, an estimate based on reward × participants is shown instead.

Still need help?

Email us at [email protected]. Include your workspace ID and a description of the issue.