URL parameters are strings of text (also known as "query strings") and are a way to structure, capture, and store additional information for a survey's entry link URL.
http://servername.intellisurvey.com/pub/surveyID/n34fn810?c=11&pan=64
Parameters are added to the end of a survey entry link after a question mark (?). URL parameters contain pairs of keys and values, separated by an equal sign (=). A URL can contain multiple parameters, separated with an ampersand (&).
Default parameters
The survey platform supports flexible URLs with default and custom parameters, enabling integration with various vendor systems.
URL defaults | Descriptions |
_test |
To enable Testmode when running a survey. |
_tid |
Short for 'theme ID.' Allows a survey to be previewed with a given theme. Theme IDs can be located in the Themes applet. |
clone=1 |
When applied to a survey's test link, this will create an exact copy of a respondent's survey path (record), leaving the original record untouched. |
gfrm |
Short for 'go form' and used to jump to a specific form/page number within the survey. Can also jump to a start group label. |
gq |
Short for 'go question' and used to jump to that specific question. |
pan (also panelid ) |
To assign the panel ID within the entry link URL, also used with auto redirect. |
trans_id |
To assign the respondent ID within the entry link URL, also used with auto redirect. |
Survey link basics
The survey ID is generated when you add a new survey. It is the ID used in the URL and must be unique to all other survey IDs. It is the first parameter on the LIVE link as follows:
http://servername.intellisurvey.com/pub/survey_ID.
The next parameter is the respondent ID. This is also commonly placed in the URL and must be unique to all other respondent IDs for a particular survey. This value is stored in the system variable trans_id
. The system generates a random 12 character alpha-numeric respondent ID by default if one is not passed in. It is the second parameter on the LIVE link, as follows:
http://servername.intellisurvey.com/pub/survey_ID/respondent_ID.
Passing in parameters
After the survey and respondent IDs, we can set up as many additional query string parameters as needed for a survey. The general format to include additional parameters is as follows:
http://servername.intellisurvey.com/pub/survey_ID/respondent_ID?e=<param1>&pan=<param2>
-
The beginning of the query string portion of the URL is established with a question mark (?) and then is followed by the first parameter name given, 'e', followed by the value passed in place of <param1>.
-
The second, and each additional parameter, is separated with an ampersand (&) followed by the name given, 'pan', the value passed in place of <param2>.
Capturing parameters
To store and use a URL parameter, set up a variable based on the data type. For open-end data (e.g., text like a name), use a type: text
question to store a string. For closed-end data (e.g., numeric values), use a type: radio
or type: checkbox
question to classify information.
Use url_param
to then populate these variables.
url_param
To use url_param
, place it on the dvalue
or cvalue
tag with the correct variable type as mentioned above. The example below captures the respondent's first name from the entry URL. Since the name is text, we use type: text
for the QF_NAME variable.
URL example
http://servername.intellisurvey.com/pub/survey_ID/respondent_ID?n=Jeff
Variable to capture and store the data
F_NAME. Respondent First Name Passed In invisible: y type: text cvalue: url_param('n')
Redirect link formatting
Many panels require appending custom data to URL parameters, which may include variable data. Also, it's possible to let the software temporarily store a parameter and its value in the background without recording it in a variable. Survey variables, Perl conditionals, and data temporarily stored from an entry URL are all valid values our system panel (redirect) sheet or Panels applet.
Survey variable reference
Survey variables can be directly referenced:
https://www.somepanelprovider.com?custom_param=$QSURVEY_VARIABLE
Perl conditionals
Perl conditionals can be used within Perl code blocks:
https://www.somepanelprovider.com?custom_param=[* if ($Q1 == 1) {'A'} else {'B'} *]
Passing data not captured in a variable
If a value from the invite link isn't captured by survey fields and remains constant for the study, prepend $pan_
to the parameter name from the entry URL to reference it.
Example
In the entry link, the 'list' parameter passes the value '1001'. This value is temporarily stored as $pan_list
and can later be used in the redirect link.
When the respondent receives their final status and is redirected to the panel provider's website, the redirect link uses the custom parameter 'source' to send back the list value. This is constructed as source=$pan_list
, where $pan_list
will be populated with the value '1001'.
Entry Link:
http://servername.intellisurvey.com/pub/mysurveyid?pan=101&list=1001
Redirect Link:
https://www.somepanelprovider.com?source=$pan_list
Comments
0 comments
Please sign in to leave a comment.