Can the SurveyMonkey custom parameter be passed ba

2019-06-19 01:40发布

问题:

I am looking for a way to get back the custom parameter "c" 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 do have a platinum plan with SurveyMonkey.

回答1:

The unique ID parameter is passed through on your redirect URL. So if you have a redirect URL set to http://mydomain.com and pass ?c=Tony to the collector link, the user will be directed to http://mydomain.com?c=Tony upon completion of the survey. If you own http://mydomain.com, you should be able to collect this parameter and provide a custom response for the respondent who lands on your page.

The unique ID is also available from the get_respondent_list API endpoint. You will need to request it specifically since it isn't returned by default. You can do that by adding custom_id to the fields array of your request.

For a quick reference, the example given on the docs page includes custom_id:

curl -H 'Authorization:bearer XXXYYYZZZ' -H 'Content-Type: application/json'
https://api.surveymonkey.net/v2/surveys/get_respondent_list?api_key=your_api_key 
--data-binary '{"survey_id":"100399456", "collector_id":"23907195", 
"fields":["first_name", "date_start", "date_modified", "custom_id", "analysis_url"], 
"page_size":5, "page":1, "start_date":"2013-02-04 23:25:09"}'