Watts-Lab / surveys

Library of surveys for deliberation experiments
MIT License
3 stars 4 forks source link

Work out how to add surveys to plain old HTML/js pages (ie, to embed directly in Turk) #80

Open JamesPHoughton opened 1 year ago

JamesPHoughton commented 1 year ago

As a researcher, I want to be able to embed each survey from this repo in empirica, on a separate webpage, and in an Mturk HIT, so that I can ensure that it is administered consistently regardless of where it is used.

One way to do this would be to package the surveys in this repo for embedding as a javascript library within a <script> tag in an HTML page. This may be possible using UNPKG and the existing npm build. It may alternately turn out that the existing package can't be run without React, in which case we may need to create two separate builds, one using SurveyJS's react backend, and another using one of the other backends (e.g. jquery)

Ideally, this would be done without any changes to the existing surveys/ folder. It may require writing a separate SurveyFactory file and a separate index.js, and modifying the rollup config.

This may also let us embed the surveys in their own Readme's...