Skip to content
This repository was archived by the owner on Nov 22, 2022. It is now read-only.

Commit 5a04ae8

Browse files
Revise third-party integration documentation
1 parent 585a827 commit 5a04ae8

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

docs/learn/deploy/3-third-party.rst

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,17 @@ Studies built in ``lab.js`` integrate well with external tools, and will happil
1313

1414
.. seealso::
1515

16-
This page covers integration with third-party tools in general. We cover the most popular tools individually:
16+
This page covers integration with third-party tools in the abstract. We cover the most popular tools individually:
1717

1818
* :ref:`Open Lab <tutorial/deploy/third-party/jatos>`
1919
* :ref:`JATOS <tutorial/deploy/third-party/openlab>`
2020
* :ref:`Qualtrics <tutorial/deploy/third-party/qualtrics>`
2121
* :ref:`The Experiment Factory <tutorial/deploy/third-party/expfactory>`
2222

23+
.. |br| raw:: html
24+
25+
<br>
26+
2327
----
2428

2529
.. _tutorial/deploy/third-party:
@@ -36,17 +40,30 @@ This means that you'll need a couple of things for this to work:
3640

3741
----
3842

43+
.. _tutorial/deploy/third-party/prepare-experiment:
44+
3945
Prepare the experiment
4046
----------------------
4147

42-
The first step is to **prepare the experiment you've built for use within external software**. Once you have a working study, all you need to do is export it using the *generic survey software* integration. This will give you a zip file; we'd ask you to unpack and upload it to a hosting provider of your choice. From there, you should be able to run the study using your browser; please make a note of the ``URL`` at which you accessed the study.
48+
The first step is to **prepare the experiment you've built for use within external software**. Once you have a working study, please export it using the *generic survey software* integration. This will give you a zip archive with all the necessary files to run the study, pre-configured to send the data to a third-party service.
49+
50+
After exporting the study, the next step is to **make it accessible to the survey software**. In most scenarios this means uploading the study files to a hosting provider or webspace. Some tools, notably JATOS and Open Lab, will host the study files for you, but others, you'll need to host the study yourself, outside of the survey. |br|
51+
If your institution provides a server, or you have a personal webspace, you can unpack the study files there; if you don't, we like to use `Netlify Drop`_, which makes uploading and hosting a study a drag-and-drop operation (you'll need to setup a free account to permanently store your files with Netlify).
52+
53+
Whereever you upload your study, please make a note of the ``URL`` at which it is accessible, you'll need it for the next step.
54+
55+
.. _Netlify Drop: https://app.netlify.com/drop
56+
57+
.. note::
58+
59+
**We're happy to help you with this!** We recognize that hosting a study can be a tricky step; please `join our support community <https://lab.js.org/resources/support/>`_ if there's anything we can support you with.
4360

4461
----
4562

4663
Prepare the survey
4764
------------------
4865

49-
Inside the survey, **you'll need to add a new text input field that will serve to capture and store the experiment's data**. Because we'll fill it with lots of strange-looking experimental data, it should ideally be hidden from participants (and not limited in length). You probably know best how to create this; **we've provided pointers for a few tools we've worked with below**.
66+
Inside the survey, **you'll need to add a new text input field that will serve to capture and store the experiment's data**. Because we'll fill it with lots of strange-looking experimental data, it should ideally be hidden from participants (and not limited in length). You probably know best how to create this; **we've provided pointers for a few tools we've worked with above**.
5067

5168
----
5269

@@ -79,7 +96,7 @@ To process and save the data, the surrounding page needs to capture the results
7996

8097
<script>
8198
// Listen for the study sending data
82-
window.addEventListener('message', (event) => {
99+
window.addEventListener('message', function _labjs_data_handler(event) {
83100
// Make sure that the event is from lab.js, then ...
84101
if (event.data.type === 'labjs.data') {
85102
// ... extract the data lab.js is sending.
@@ -94,6 +111,9 @@ To process and save the data, the surrounding page needs to capture the results
94111
// (the specific code here will depend on the tool
95112
// you're using to process and store the data)
96113
// ...
114+
115+
// ... finally, stop listening for further data
116+
window.removeEventListener('message', _labjs_data_handler)
97117
}
98118
})
99119
</script>

docs/learn/deploy/3a-qualtrics.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Working with Qualtrics
55

66
`Qualtrics`_ is a popular proprietary questionnaire and survey tool that is easy to pick up. Studies built with ``lab.js`` can be embedded in Qualtrics with a few simple steps; setting up the connection should take you about 10 minutes.
77

8+
Before you go through the steps below, please make sure that you've :ref:`prepared your study for use in third-party tools <tutorial/deploy/third-party/prepare-experiment>`.
9+
810
.. _Qualtrics: https://www.qualtrics.com
911

1012
.. contents:: Steps

0 commit comments

Comments
 (0)