Custom Variables is a logic feature that allows you to track data about respondents by passing one or more values through a survey link and into your survey results.
To add custom variables:
- Click the Design Survey tab.
- In the left sidebar, click LOGIC.
- Click Custom Variables.
- Set up the first variable by completing the following fields:
- Variable Name (required) - This will appear in the URL string itself. The Variable Name cannot contain any spaces. Max 50 characters.
- Label (optional) - This will appear in your analysis, so create a label that will help you track what information the field contains. Max 250 characters.
- Click Save.
- If you wish to add additional custom variables, click + New Custom Variable and repeat steps 4 and 5.
After you create the custom variables in the Design Survey section, you'll need to create your survey link.
- Under the Collect Responses tab, create a Web Link Collector.
- Copy the survey link. You'll notice that the template for adding your custom values will already be appended to the end of the link. It will follow this format:
- Outside of SurveyMonkey (for example, in Excel), replace the bracketed values with the values you want to pass through the URL. Custom variables are case sensitive, so make sure they match what you entered in the Design Survey section.
- Send the link(s) to respondents.
All Responses Data exports in XLS, or SPSS format will include the custom variables tied to each respondent at the end of each row.
You can also filter by custom variables when viewing your results in Analyze.
Web Link collectors can attach up to 100 custom variables to the URL. So you don't exceed universal URL length limitations, we suggest URLs remain under 2,000 characters to maintain functionality with popular web browsers.
Due to clashes with the SurveyMonkey site, you can't use the following Variable Names when you create Custom Variables:
You can't use the following URL-reserved characters in Variable Names, Variable Labels, or in the values you insert into the survey link template:
There is no way to automatically insert values into the survey link template within SurveyMonkey. You will need to do this manually, or run your own script to insert the values into the survey link template, outside of SurveyMonkey.
If you are uncomfortable with this approach, consider using the Email Invitation Collector to track custom data about respondents.
Custom variables don't work with Recurrences. Turn off the Recurrence collector option to make sure your custom variables work properly.
Let's say you want to send out a short employee survey to three members of your Research department. Instead of asking each respondent to fill out their name, department, and title in the survey itself, you want to track this information about them through the survey link using Custom Variables. Here's how you would do this, from beginning to end:
Create 3 variables based on the respondent information you want to pass through the survey link.
Variable Name: n
Variable Name: dept
Variable Name: t
Create a Web Link Collector. When you view the link, the template for adding your custom values will already be appended to the end of it:
Outside of SurveyMonkey, create a unique link for each respondent by replacing the bracketed values with each person's Name, Department, and Title. Send each unique link to each respective respondent.
Download an All Responses Data XLS, or SPSS export to see the custom variables paired with each response. In the spreadsheet, the results for this one-question survey will look like this:
|Which do you like best?||Name||Department||Title|