How to integrate Stim Admin into a Survey

Select an integration method

There are essentially 3 integration methods for Stim Admin:

  • Javascript embed
  • iFrame embed
  • Redirect

The deciding factor for the recommended integration method is the tools you need access to. Redirect is the most basic and least reliable (higher chance of participant dropout) while JavaScript is the most advanced and extremely reliable. Use this feature list to help make a decision then read further for more detail on each method.

Feature List JavaScript iFrame Redirect
Eye tracking on images and videos
Emotion detection on images and videos
Support for Google Chrome and Firefox
No Software Installations
Multiple Languages Supported
Accessed from single domain
Undisrupted user experience
Troubleshooting Support
Screening Out Functionality Limited
Programmable behaviour for error events Limited
Programmable behaviour for status events
Retain calibration during survey questions
Bespoke Custom Development Projects
Works without JavaScript support
Works without HTML or JavaScript support

Javascript Embed

JavaScript is the most reliable and robust method of embedding StimEngine and is the recommended option for any large scale project. JavaScript is supported by most large survey platforms and allows for customisation of behaviours when interacting with the survey platform. JavaScript also allows for custom events to trigger for participants based on their status allowing for functionality such as timeout triggers or additional instructions for users experiencing issues. Error events are also customisable allowing for custom events to trigger when errors such as an unsupported device or no webcam is detected. These events can fully interact with the survey tool allowing for participants to be screened out or sent down other pathways in the survey. While screening out participants using the survey platforms tools is usually effective if a participant gets past these checks or switches browser mid way through the survey they could potentially get stuck once they reach the StimEngine portion of the survey if not using JavaScript. Ensuring custom behaviours for these errors allows full control over the user’s interactions with the platform. JavaScript also allows calibration points to be retained while asking other survey questions in between.

iFrame Embed

iFrame embedding offers most of the functionality achieved through JavaScript embedding but sacrifices some features and customisation. iFrames have some interactivity on error events and will be able to see what error caused the participant to fail however there is limited control over what behaviours can happen following these events. iFrames have no control over status events and won’t be able to indicate if a participant’s face has been found removing all customisation from this process. This can lead to participants getting stuck affecting their user experience during the survey. iFrames cannot retain calibration points once the iFrame has closed meaning questions cannot be in between stims without restarting the session. iFrames are more widely supported as some platforms stop any added JavaScript to avoid users exposing participants to malicious code. In the case where you are unable to switch platforms and have no JavaScript support an iFrame is a suitable alternative.


Redirect is not a recommended method but is acceptable where the platform is unable to access JavaScript or HTML code. Redirect will show the creative then redirect back to the survey via the link provided by you and will include the session ID code in the return URL. This sessionID needs to be captured to ensure you can identify participants when doing analysis. VisitorID and SID are not captured in the redirect method meaning there is no way for us to track the number of participants that drop out once redirected to a new page. Participants who encounter an error with the redirect will be sent back via the same URL with an error status in place of the sessionID. For projects with more than 100 participants is not recommended to be run on a redirect integration due to the difficulty in communicating issues that may arise back to the survey platform.