Overview#
To provide a better respondent experience, we recommend skipping common demographic questions in your survey. You may specify demographic variables that you would like appended in your survey within the Survey Entry Link.How to use#
To append a respondent’s answer to a PureSpectrum qualification, use the following notation when entering your entry link in either Buy API or in the UI:https://mysurvey.com/survey?demographicVariable=[%%ps_qualification_id%%]
where https://mysurvey.com/survey is the link to your survey, ps_qualification_code corresponds to the PureSpectrum qualification ID, and demographicVariable is a keyname of your choosing.Example#
https://mysurvey.com/survey?gender=[%%211%%]
When a respondent is redirected to your survey, their entry link will contain the PureSpectrum condition code or input of their answer. This value of the respondent's answer will be inserted where you have specified.We automatically append “transaction_id” to your entry link
Additional example#
Appending gender, age, and income for a respondent who is male, 29, earning $45,000/yearYour entry link defined in PureSpectrum:https://mysurvey.com/survey?gen=[%%211%%]&age=[%%212%%]&income=[%%213%%]
The respondent’s actual entry link into your survey:Important Considerations#
While you may call the keyname as you wish (e.g. “gender”, “gen”, “sex”), the value returned in the keyname will always use the PureSpectrum condition code.Please refer to the Get attributes endpoint to determine your qualification and condition codes.We can always append Gender & Age of a respondent, and can also append any audience criteria that is defined in the survey.If the survey is screening on ethnicity, then race can be added to the live link using https://mysurvey.com/?race=[%%244%%]
If a qualification is added that is not present in the survey, the entry link for the respondent may contain “null” in the query string parameter, which may break your survey (e.g. https://mysurvey.com/survey?transaction_id=abc123&race=null).In the event that a question is a multi-select (where more than one answer is permitted), the answers will be appended as a comma-separated string (e.g. &pets=111,112).Income and age questions return an integer. If you need to place these respondents into a bucket, like age 55-64, you will need to account for this in your survey when processing the respondent’s profile.Common Demographics and their Qualification ID’s#
| Demographic | ps_qualification_code | Demographic Option | PureSpectrum Condition Code For Option |
|---|
| Gender | 211 | Male | 111 |
| Gender | 211 | Female | 112 |
| Age | 212 | User Defined Input | Returns the user’s age as an integer (e.g. age=27) |
| Household Income | 213 | User Defined Input | Returns the user’s household income as an integer (e.g. income=55000) |
| zipcode | 229 | User Defined Input | Returns the user’s zipcode as an integer (e.g. 90403) |
The list above is just for representation purposes. For a full, updated list please look at the Get attributes endpoint.