> For the complete documentation index, see [llms.txt](https://help.imotions.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.imotions.com/lab/study-setup-and-design/stimuli/qualtrics-survey-how-to-setup.md).

# Qualtrics Survey: How to Setup

Configure a Qualtrics survey and the iMotions Lab API settings to run the survey as a stimulus with scene markers and study and respondent data.

*This article walks through the use of Qualtrics surveys in iMotions Desktop (version 10.1.2 or later) The article will cover both of the following areas*

* [*Qualtrics Platform Configuration*](#qualtrics-platform-configuration)
* [*iMotions Configuration*](#imotions-configuration)

### Qualtrics Platform Configuration

The section below will show all the necessary configurations you need to apply to your Qualtrics survey

Video guide for Qualtrics Platform setup.

{% embed url="<https://files.imotions.com/hc_articles/videos/imotions-qualtrics-platform.mp4>" %}

### 1. Edit the "End of Survey"

Click on the End of survey block at the end of the questions - Change the dropdown box called “End of Survey message” to “**Redirect to URL**” with the value:

“\*\*<https://endstimulus.imotions.com**”>

NOTE: This allows for iMotions slideshow to continue at the end of the Qualtrics survey.

### 2. Adding Javascript lines

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-6992d04050f3a888ae311a390cdb7519974e7625%2Fd1367975b8_unnamed--3-.webp?alt=media)

Javascript lines

1\. Select the first question in your Qualtrics page, as seen in the video above - First Question.

2\. When selecting the actual question, an option to select Javascript in the lefthand bar should appear.

3\. Delete everything currently in the Javascript window, and replace it with the following:

4. Do this for the first question in every new Qualtrics page. Ergo If you have a page break, then you need to add the javascript to the first question again.

{% hint style="info" %}
Qualtrics.SurveyEngine.addOnload(function()

{

/\*Place your JavaScript here to run when the page loads\*/

});

Qualtrics.SurveyEngine.addOnReady(function()

{

/\*Place your JavaScript here to run when the page is fully displayed\*/

window\.IMOTIONS\_DESKTOP.Api.sendStart(this.getQuestionInfo().QuestionID, "", "I")

});

Qualtrics.SurveyEngine.addOnUnload(function()

{

/\*Place your JavaScript here to run when the page is unloaded\*/

window\.IMOTIONS\_DESKTOP.Api.sendEnd()

});
{% endhint %}

E.g. First click on the question, then the Javascript item in the menu, and finally replace the text with the code snippet. This is sending a start marker when the survey is ready, and an end marker when the question unloads.

NOTE:

This should only be done on the ***First*** question in your survey. This step is only required if you intend to use Eyetracking data, collected on individual scenes. If you do not need the automatic Scene generations, then the Javascript is not necessary to include.

### 3. Embedded Data

In the “Survey flow” section, add an “Embedded Data” element with the fields “**iMotionsStudy**” and “**iMotionsRespondent**”. Make sure the spelling is correct.

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-a07ce8e3de047b449cf752cb37f8d42fa518f6d1%2F52da64afb1_embedded1.webp?alt=media)

![](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-62bab86e658c2ba9d693d4f3e28c3c4184222e09%2F0bb55948de_embedded2.webp?alt=media)

Press Apply at the bottom right button.

Your survey is now ready to be published and distributed - Next configure your iMotions setup.

## iMotions Configuration

#### Initial Setup API of iMotions Global Settings

For iMotions to pass information to Qualtrics the iMotions API Event Forwarding and Event Receiving (using TCP) must be enabled. Changes to Global Settings will be saved, so these steps would only need to be done for initial setup. If API settings are not available (i.e. grayed out), please get in touch with your Customer Success Manager or <support@imotions.com>.

1. Go to Preferences > Global settings > API tab
2. Enable "Event receiving", "Event forwarding", and “Use TCP” by checking the boxes for those settings (as shown in the following screenshot):

![The API tab of Global Settings with event forwarding and event reception enabled, both with Use TCP](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-431f5e3ff8f15425f7dabeacfc4194b8f681eb92%2Flab_global-settings_api_event-forwarding-receiving.png?alt=media)

#### Creating an iMotions Desktop study including Qualtrics surveys

Once the iMotions API settings are checked, an iMotions Desktop study can be created:

1. Click the Create Study button to begin creating a new study

   ![The Add Study button in the Library](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-64a95c357e799a44e9e9c73a91c84600545b7023%2Flab_library_add-study-button.png?alt=media)
2. Select “Screen-based” and click “Next”

   ![The study wizard with Screen-based selected as the study type](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-48a368bbe67efa558ebf495de279db07b241e9dd%2Flab_study-wizard_study-type_screen-based.png?alt=media)
3. After defining “Respondent screen” settings, select “External Events API” and any other sensors that will be used in the study, then click “Next”

   ![The Select sensors page of the study wizard with External Events API selected](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-b0266a60f85cd9091db5004f3caa944a7e53fcf0%2Flab_study-wizard_sensors_screen-external-events-api.png?alt=media)
4. “External Events API” can also be checked/enabled in the Sensors for any study (prior to data collection)

   ![The Sensors tab of a study with External Events API selected](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-6043fc60ada055e247cde7d40f0e792012807b8f%2Flab_library_study-sensors_external-events-api.png?alt=media)

#### Adding Qualtrics survey stimuli to an iMotions Desktop Study

1. Click the “Edit stimuli” button to bring up the Study Builder window

   ![The Edit stimuli button](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-4a8ad8810b9f824a5572e1a30c767ac7e4bafe50%2Flab_library_edit-stimuli-button.png?alt=media)
2. Click “Qualtrics” and enter the Qualtrics Address

   ![The dialog for the Qualtrics survey address](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-2166395bd165f811c93f9485cdae02c93b011fb1%2Flab_study-builder_qualtrics-address-dialog.png?alt=media)
3. Add/edit additional stimuli as needed for the study
4. Qualtrics stimulus properties can be edited (prior to data collection)

![The Study builder with a Qualtrics stimulus selected and its properties](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-e9691e37659e0367576c47229ada0be2177c5a6c%2Flab_study-builder_qualtrics-properties.png?alt=media)

### Alternative Stimuli - Qualtrics Survey via Webstimuli

In iMotions 10.1.2 it's also possible to use Webstimuli to launch and record Qualtrics Surveys. Following the same Study setup as previously, but instead of adding Qualtrics Stimuli, you add webstimuli instead.

![The dialog for a website address, with a Qualtrics survey link](https://286068319-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNLNBWkNpljDaAj5rQtNa%2Fuploads%2Fgit-blob-fbbf9e9ab7bd6296a3aec2fff421776ac3763ffc%2Flab_study-builder_website-recording-dialog.png?alt=media)

### Hide Address Bar (Kiosk mode)

This will launch the browser in full-screen mode with no option to enter a different Url or access the normal window controls to close/move a window. To close the browser window, the user must do one of the following

1. Make sure the web stimulus is set up as a Manual Change stimuli, and then during the slideshow click the next slide button (2 screen setup), or have the respondent press Shift-Space (or whatever the key combination for next slide is setup to be). OR
2. Ensure the web page has a link to <https://endstimulus.imotions.com> at some point during the workflow. This should trigger iMotions to close the browser window and move to the next slide. OR
3. Ensure the web page executes some javascript when the workflow is complete window\.IMOTIONS\_DESKTOP.Api.forwardToNextSlide();

### Add Query study and respondent as query parameters.

If you check these fields, iMotions will append the current study name and respondent name to the URL so that the website can use them to correlate the web session with the current respondent. E.g.

<https://news.bbc.co.uk> would be augmented to <https://news.bbc.co.uk?iMotionsStudy=Desktop+With+web\\&iMotionsRespondent=Preview>

Where the study name here is “Desktop With web” and the respondent name was “Preview” (this was captured as part of a preview slideshow).

#### Markers from the browser

If you wish for your Browser to send markers into iMotions, you can enable a new feature in iMotions Global settings API. This was an automatic feature in Qualtrics Stimuli, where onset of a new Qualtrics page, would add an event in the full recording. To have the same feature with the Website stimuli, check **Browser Markers** in the **Event Receiving** section of the **API** tab in Global Settings.

This is enabled by default, if you use Chrome or Edge as your browser. The feature is not supported for Firefox.

## Attachments

**Qualtrics and iMotions run (video)**

{% embed url="<https://files.imotions.com/hc_articles/videos/qualtrics-imotions-run.mp4>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.imotions.com/lab/study-setup-and-design/stimuli/qualtrics-survey-how-to-setup.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
