docs/Power features/LimeSurvey
connect your survey tool

LimeSurvey.

Map each Samply parameter under Panel integration, then redirect via the End URL using {PASSTHRU:…}.

1 · Pass the Samply IDs into the survey

"Panel integration" (Survey menu → Panel integration → Add URL parameter), each parameter mapped to a Target question so it is saved into the response and export.

  1. For each Samply parameter, first add a free-text question to hold it — type "Sort text" (Short free text) or "Multiple texts" — with a clear code such as samply_msg; optionally hide it.
  2. Go to Survey menu → Panel integration and click "Add URL parameter".
  3. In "Parameter" type the exact GET key from the start link (e.g. msg), and in "Target question" select the matching free-text question. Repeat per parameter.
  4. Always set a Target question — without one the value lives only in the session and is NOT written to the export.
Example start link
https://<your-limesurvey>/index.php/<surveyID>?msg=%MESSAGE_ID%&pid=%SAMPLY_ID%&code=%PARTICIPANT_CODE%

2 · Register completion

The End URL (Survey text elements) with the {PASSTHRU:msg} placeholder, plus "automatically load the end URL" enabled in Presentation so it redirects on completion.

  1. Make sure %MESSAGE_ID% is defined as a Panel integration parameter (e.g. named msg) so {PASSTHRU:msg} is available.
  2. Survey settings → Text elements → set End URL to: https://samply.uni-konstanz.de/studies/<study-code>/done/{PASSTHRU:msg}
  3. Survey settings → Presentation → enable automatically loading the End URL on completion, so the participant is redirected (not just shown a link).
  4. Activate and test: {PASSTHRU:msg} resolves to the value LimeSurvey received in the start link.
Example completion redirect
https://samply.uni-konstanz.de/studies/<study-code>/done/{PASSTHRU:msg}

Or register completion silently with a POST

The redirect above navigates the participant's browser to Samply. The same completion can instead be registered server-to-server with an HTTP POST to /studies/<study-code>/done/<message-id> — no request body and no authentication (the message id in the path is the shared secret). Samply replies 200 on success or 400if the id matches no response, and it records the completion and cancels that send's pending reminders exactly like the redirect — just without redirecting. Whether LimeSurvey can issue that POST itself varies:

Possible — verify against your account
Core LimeSurvey only redirects; a silent POST needs a self-hosted install plus a plugin on the afterSurveyComplete event. Existing webhook plugins POST a JSON body to a fixed URL, so they must be adapted to put the id in the path.
  1. This needs a self-hosted LimeSurvey where you can install plugins (LimeSurvey Cloud generally cannot).
  2. Start from a community webhook plugin that subscribes to afterSurveyComplete and POSTs via cURL (e.g. IrishWolf/LimeSurveyWebhook or nicon8/httphook) — these are unofficial, so vet the code.
  3. In the afterSurveyComplete handler, load the completed response by responseId and read the stored msg value (the question column that captured {PASSTHRU:msg}).
  4. Change the plugin's URL from a fixed URL + JSON body to append msg to the path — rtrim($sUrl,'/').'/'.$msg — and POST with an empty body to https://samply.uni-konstanz.de/studies/<study-code>/done/<message-id>.
  5. Install into upload/plugins/, activate under Configuration → Plugins, set the base URL, and test against your LimeSurvey version (3.x/5.x/6.x differ).
POST endpoint
POST https://samply.uni-konstanz.de/studies/<study-code>/done/<message-id>

POST sources: https://www.limesurvey.org/manual/AfterSurveyComplete · https://www.limesurvey.org/manual/Plugin_events · https://www.limesurvey.org/manual/Plugins_-_advanced

Full request and response details are in the API reference.

Reserved parameters & gotchas

Do not reuse LimeSurvey-reserved start-URL keys: sid, lang, token, newtest. Use names like msg, pid, code. {PASSTHRU:name} only works if name was first defined under Panel integration.

Things to watch out for

  • The exact wording of the Presentation toggle that auto-loads the End URL varies across LimeSurvey 3.x/5.x/6.x — confirm it in your installed version.

Sources

These steps were verified against the platform's official documentation.