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.
This option allows you to redirect your respondents to any website of your choice at the end of the survey. You can even pass any custom IDs that you may have appended to your Web Link collector through the redirect.
Use the rich text editor to add a hyperlink to your survey. You can link to additional information on your website or to a file, like a PDF, hosted on another site. You can't add hyperlinks to your Survey Title or Page Title.
The Web Link collector lets you share a survey link and collect responses. You can share your survey link anywhere—like on social media, in an email (using your own email client), or print it on a newsletter.
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"}'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With