Insight Platform - Query Strings | Qualtrics

Passing Information Via Query Strings

Introduction

A query string is a powerful tool that allows you to pass information to and from a website by simply adding, or “appending,” that information to the end of a URL.

Data can be passed into a survey using a query string. Once passed, the data can be saved as Embedded Data. At the end of a survey, data can also be passed to another website or survey.

Passing Information into a Survey

You can pass information into a survey and save it as Embedded Data by using a query string. Doing so requires appending information to the end of the survey URL. Once information is successfully passed into a survey, you can use it in your logic and display it to participants.

Example: You can use a query string to track where a participant is entering the survey from. If you want to track which participants are coming from Facebook and which are coming from LinkedIn, you could create two customized links.

http://survey.qualtrics.com/jfe/form/SID=SV_1234?Source=Facebook
http://survey.qualtrics.com/jfe/form/SID=SV_1234?Source=LinkedIn

You can use this Source information in your data to use in reporting, pipe it into questions to display for your respondents, and base Branch and Display Logic on it to show or hide relevant questions.

To append Embedded Data to a survey URL

  1. Copy the survey URL and paste it into a text editor such as Word or Notepad.
  2. Add an ampersand (&) to the end of the URL.
    Qtip: If this is the first field you’re adding to your query string, you’ll need to use a question mark (?) instead of an ampersand.
  3. Type in the name of the Embedded Data field (e.g., “state” or “city”).
  4. Add an equal sign (=).
  5. Type in the value of the field (e.g., “CA” or “LA”)
  6. Repeat steps 2–5 to add as many fields as you need.

Example: The following URL passes the Embedded Data fields “state” and “city.”

http://survey.qualtrics.com/jfe/form/SID=SV_1234?state=CA&city=LA

To display Embedded Data from a survey URL in the survey data

  1. Navigate to the Survey module and open the Survey Flow.
  2. Click Add a New Element Here.
  3. Select the Embedded Data element.
  4. Enter any fields you want saved from the URL. Do not assign a value for these fields; the value will be pulled dynamically from the survey URL for each participant.

image00

Passing Information from a Survey

You can pass information from a survey to another website or from one survey to another survey by appending information to the Redirect URL. This is commonly done when working with a third party panel provider.

Attention: The redirect destination needs to be configured to accept the information passed in the URL. Otherwise, the passed information won’t be captured. See Passing Information into a Survey above to learn about configuring a survey to accept information passed in the URL.

To pass information from a survey

  1. Generate the Piped Text code for each piece of data you would like to pass  (e.g., answers to survey questions, Embedded Data, or any other information collected with the response).
  2. Copy the Redirect URL and paste it into a text editor such as Word or Notepad.
  3. Add an ampersand (&) to the end of the URL.
    Qtip: If this is the first item you’re adding to your query string, you’ll need to use a question mark (?) instead of an ampersand.
  4. Type in the name of the variable you’d like to pass.
  5. Add an equal sign (=).
  6. Paste the Piped Text code for the variable.
  7. Repeat steps 2–6 to include all of the data you want to pass.
  8. Paste the Redirect URL into the appropriate survey termination area (e.g., Survey Options or End of Survey element).

Example: The following URL would pass a variable that contains a participant’s unique ID. The participant’s ID would be saved as an Embedded Data field “ParticipantID” and the Embedded Data fields would be passed to www.mywebsite.com when the participant finished the survey.

http://www.mywebsite.com?ID=${e://Field/ParticipantID}