Search code examples
phpsurveymonkey

Pass custom parameter when survey complete in survey monkey V3


I am looking for a way to get back the custom parameter "name" that is used for storing Custom Data in the SurveyMonkey system when a user completes a survey, whether that be via the Embed OR WebLink.

Any suggestions on how others have approached this?

I already saw this SO But that is Version 2 in my case The get_respondent_list is not in the Version 3 API. (Sorry for copy paste that same question but I am looking the same result in v3)

And Any suggestion about add signature pad includes the every Survey.


Solution

  • One way to do this is to set a custom variable on your survey (URL parameters). You can also do this with the API, the docs is here.

    Then when you have a weblink collector, if you created a custom variable called name then you would send the user to something like:

    https://www.surveymonkey.com/r/2Q3RXZB?name=tester
    

    Then that name=tester will be stored with that response in the SurveyMonkey side. You can see it when you pull responses.

    When you do:

    GET /v3/surveys/<survey_id>/responses/<response_id>
    

    You'll get a payload back with the value like this:

    ...
    "custom_variables": {
        "name": "tester"
    },
    ...