For the Google option, you will need to go to Google Drive and create three spreadsheets in Google Sheets.
One sheet will be used to store the raw data (database
), one sheet will be used to store spliced data (splicedDataset
),
which will then be used to check compliance, and one sheet will be used to store compliance rates (compliance
). For each
spreadsheet, note the ID of the sheet. The sheet id is used to tell the web app where to write the data and is found in
the URL for the Google sheet. It is a long string of letters, numbers, and symbols that appears before “/edit#gid=…
”
You can also create a Google Document that will act as a log of the web app’s activities.
- Go to Google Script.
- Select a Blank Project in the top left of the menu of the pop-up dialog. You can copy and paste the script from this page or from GitHub.
- You will then replace the variables
databaseID
,splicedDatabaseID
,complianceID
, andDocumentID
, in the example code with the ids you stored for the raw data spreadsheet, the spliced data spreadsheet, the compliance data spreadsheet, and the web app log, respectively. - Change the end date by adding the appropriate number of days to it. It is currently set for two weeks.
- Save the script.
You are now ready the test and potentially deploy the data storage web app.
- Click on the debug icon, which looks like a bug and is located beside the dropdown menu titled Select function.
- The script will then ask for Authorization. Select
Review Permissions
. - Click on your Google Account
- You will see "This app is not verified" on the screen. Click on
Advanced
underneath it. - Scroll down and click on
Go to Untitled project (unsafe)
Note: the name of the project may vary depending on how you have named your project. - Then click
Allow
. You will most likely get an email from Google notifying you that an unverified app has been made. - To deploy as a web app, a project version needs to be created.
- Go to
Publish
thenDeploy as web app
. - In the dropdown menu for Who has access to the app, select
Anyone, even anonymous
. - Then click
Deploy
. Copy the URL that appears belowCurrent web app URL
. You need this URL to input into your ExperienceSampler code so that the app knows where to send the data.
Next, you will need to tell the ExperienceSampler where to send the data by locating the saveData
and saveDataLastPage functions in the index.js
file and copying and pasting the URL for the Google web app.
The only difference between the saveData
and saveDataLastPage
functions is that participants will be notified whether the data was
sent to the server successfully when the saveDataLastPage
function is executed but not when the saveData
function is executed. These
functions ensure that the data is being sent to the server as often as possible so that participant data files are as up-to-date as
possible. This allows for the most accurate records of response compliance (i.e., using the saveData
function) that can be checked
daily using our automated compliance checking program but not annoy participants by notifying them every time their data has been
sent successfully. We chose to only notify participants when they would naturally expect to receive such confirmation – when they
have completed the survey. If you choose not to notify participants, then you only need to implement the saveData function; however,
we would advise you to use the saveDataLastPage
function during testing to ensure that your data is being sent and saved correctly.