To use multiple instances of HX Embed JavaScript in the same survey, you have to take into account there are some differences in respect to the single instance case:

  1. You have to create a separate activity for each HX Embed instance

  2. The webcam preview should be viewed only for the first HX Embed instance

  3. The consent/demographics page should appear only for the first HX Embed instance

The 1st requirement has to be satisfied by you manually, the 2nd is satisfied by configuring each HX Embed instance (as shown below), while the 3rd is done automatically without configuration or user intervention.

The process requires some manual work as noted below:

  1. Create as many HX Embed activities as required and complete the configuration of each one as required

  2. Copy and paste the HX Embed code for the first instance as it is

  3. Copy and paste the HX Embed code for any following instance including the last one and add/change the attributes as noted below.

Changes should be applied to the WebRecorderWorkflow2Embed object configuration.

No changes for the first instance.

Changes for any following instance including the last one (just after the newVisitor attribute):

Did this answer your question?