Qualtrics

Embedded data and query strings

You can pass information to Qualtrics to store and use in your survey via query strings, for example the callbackUrl or the assignmentId of the Pool Tool.

You can find the documentation about how to do so here.

The documentation about how to use Embedded Fields in Qualtrics can be found here.

Callback URL setup example

  1. In your Qualtrics survey, create an Embedded Data field (Survey Flow > Add new element > Select Embedded Data) and name it the same as the url parameter that contains the callbackUrl. Qualtrics will automatically store the URL parameter in this embedded field.
    1. If you want to use a different name, refer to the section ‘Manually store URL parameter’.
  2. Select the “End of Survey” Block in the Survey Builder, select Redirect to URL and set the website URL to your embedded field: ${e://Field/your-embedded-field-name}. You can find the documentation here.

Manually store URL parameter

const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
let redirectUrl = urlParams.get('url-parameter-name')
let redirect = new URL(redirectUrl);
Qualtrics.SurveyEngine.setEmbeddedData("embedded-field-name", redirect);