Often, you will know certain information about a respondent before they respond to your survey, simply based on the place where they saw the survey link.
Custom variables allow you to pass information via the survey web link, which can then displayed within the survey, as well as on any reports generated from the survey.
Because they are transmitted via the URL, Custom variables can only be used by manually editing the values for those variables in the default live survey link e.g. before it is sent out in a letter or email. The link cannot be configured within the SmartSurvey system when creating the survey.
An example web link with the custom variables in blue is:
https://www.smartsurvey.co.uk/s/Surveyname/?Firstname=Bob&Location=Birmingham
Customised links can then be sent manually to respondents. Many organisations use Custom variables by having a CRM system or their website merge these values into the URL when the link is generated for that respondent.
Creating a Custom Variable
To create a variable:
- Go to My Surveys and select Build in the survey box for the survey you wish to edit. Alternatively you can click on the Survey Title itself
- In the white navigation bar on the left of the page, click on Custom Variables
- Click the green Add Variable button
- Type a Variable Name in the box. This is the text you want to appear in your survey link, naming the variable
- Type a Label. This is how the variable name will appear in your results
- If you want your variable to be required, check the Is Required box. You can find out more about this functionality by hovering over the "?" icon next to Is Requred and it is covered in more detail later on in the guide
- If you want your variable to be unique, check the Is Unique box. You can find out more about this functionality by hovering over the "?" icon next to Is Unique and it is covered in more detail later on in the guide
- Click the green Save Changes button
- If you want to add more custom variables, repeat this process
Certain names for variables are reserved and cannot be used as custom variable names. For security reasons, we would prefer not to publish these. If you choose one when creating a custom variable, you will see an error message prompting you to choose a different name.
Using a Custom Variable
To make a custom variable live, you have to edit the survey link, including the Variable Name (see above) and a value for the variable:
- From the Home page, click on My Surveys in the blue navigation bar on the left of the page
- Click the Collect icon in the survey box for the survey you wish to edit
- Under Tracking Links, hover over Default Web Link and click the Settings icon next to Preview. Alternatively you can click on the Tracking Link Name
- Make sure your survey is Open, ensure that you're looking at the live link by checking it has a green box in the top right of the Tracking Link Settings popup box. This will appear red if the link is not live
- Highlight the live link located under Web Link, then copy and paste into a text editor to modify
- At the end of your Link Text, add a question mark (?) If there is already a question mark in the URL, add an ampersand (&)
- Now type your Variable Name. This should be the same as the variable name you gave when Creating a Custom Variable (above)
- Next, add an equals (=) sign, then type the value of your variable, followed by a forward slash. For example, if your Variable Name was ‘date’, type the date you want to include as the variable. Make sure there are no spaces
If you want to add another variable, add an ampersand (&) after the last variable and repeat steps 4-6. You have a maximum of 100 characters.
The final result should look like this example, colour coded so you can see:
Domain, Survey Name, Variables, and Values
https://www.smartsurvey.co.uk/s/Surveyname/?Firstname=Bob&Location=Birmingham
Unique and Mandatory Variables
Below the Variable Name and Label text boxes are two tickboxes. These allow you to configure the Survey to require that a variable be present, and / or that the value of the variable is unique for every completed response.

Making a Custom Variable Required
To make it so your survey will only load if a value is present for a particular custom variable, edit the variable as described above, then click the tickbox under Is Required. with this box ticked, the survey will not load unless a value is provided for this variable. If no value is provided, the respondent is shown the same "Survey Link Invalid" message that is shown for any incorrect survey link.
Making a Custom Variable Only Accept Unique Values
To make it so your survey will only load if a provided value is unique, edit the variable as described above, then click the tickbox under Is Unique. With this box ticked, the survey will only load if the value provided for this variable is unique - meaning that it has not been used to complete this survey before. If a respondent accesses the survey using a previously-used value, the "You have already completed this survey" message will be displayed, and the survey is not loaded.
If no value is provided for the variable, then this does not block further responses from being provided with no value. The lack of a value is not in itself considered a value.
Making a Custom Variable Require Unique Values Only
The fact that the lack of a value is not considered as a value means that, for nearly all applications where you'll want to require unique values for a variable, you will also want to make the variable required.
Requiring Unique Combinations of Values
The Is Required and Unique Value functions only work on single variables and cannot check for combinations. If you need to check for unique combinations, then you will need to concatenate (join together) your varables in whatever system is generating the links and then use as single variable in SmartSurvey to receive them.