Collecting User Data
Using Question Placeholders in project_url
project_urlThe project_url field supports question ID placeholders, which allow Prodege to dynamically insert a respondent’s answers into your survey URL. Supported question IDs can be found in the /lookup-question-by-country endpoint.
Placeholder Syntax
Question placeholders use the following format:
%q[question_id]%When the URL is generated, each placeholder is replaced with the respondent’s corresponding option_id.
Example: Single-Select Question
If you want Prodege to pass a respondent’s gender (question ID 3) into your survey URL, you would include the following placeholder:
http://www.yoursurvey.com?your_var_name=%q3%&transaction=%transid%If the respondent’s answer to question 3 is Male, and the corresponding option_id is 1, the final URL will be:
http://www.yoursurvey.com?your_var_name=1&transaction=145187Example: Multi-Select Question
For multi-select questions (for example, question ID 20: What languages do you speak?), multiple answers are returned as a comma-separated list.
Original URL:
http://www.yoursurvey.com?your_var_name=%q20%&transaction=%transid%If the respondent selected English and Spanish, with option IDs 1 and 2, the final URL will be:
Additional Notes
You may include multiple question placeholders in a single
project_urlThe entire
project_urlfield is limited to 2,000 characters, including all placeholders and parameters
Last updated