Collect information about connection speeds including location and user provided details via Survey123 and use Speedtest to automatically measure speeds.
Configuration Walkthrough Video Tutorial
- Survey123WebFormOptions
- Example form as Survey123Connect excel file
- Speedtest Custom
- Embed Your Test on Your Website
- Hosting the HTML5 front-end Test UI on your site
- Passing Test Results To The Browser
- Storing STC results using Javascript
This demo is built as a static web application.
- Download the folder contents locally.
- Update the configuration parameters in ./config/application.json; please see the 'Configure' section below for more details.
- Copy the folder to a web accessible location.
IMPORTANT - this code must be deployed to your infrastructure; it can not be hosted by Esri.
Update the ./config/application.json file in your favorite json editor:
PARAMETER | DETAILS |
---|---|
portalUrl | Organization or Enterprise URL; example: https://www.arcgis.com |
clientId | The client ID is a string that proves that you have explicitly authorized the use of Survey123 web app API from your web page. You can create the Client ID through the https://developers.arcgis.com/ website, or via the web application item page, 'Settings' tab, 'App Registration' section. |
itemId | This is the ArcGIS item ID of your Survey123 web form. |
surveyInternetQuestion | The Survey123 question name that triggers the SpeedTest form. |
ooklaUrl | This is the custom Ookla test url configured at https://account.speedtestcustom.com/login REQUIRED
|
redirectOnSubmitUrl | The application will redirect to this URL on form submission |
questionValue | Set of pre-configured Survey123 questions and answers. Please see Survey123WebFormOptions.questionValue for more details. |
QUESTION NAME | PARAMETER |
---|---|
downloadSpeed | data.download |
uploadSpeed | data.upload |
ping | data.latency.minimum |
jitter | data.latency.jitter |
testId | data.config.testId |
You can use URL parameters to answer Survey123 questions. If a question with the same name as the URL parameter name is found in the survey, the URL parameter value will be used as the question's answer.
- URL syntax: ../index.html?[ question_name ]=[ response_value ]
- Example: ../index.html?longitude=123.45
An additional workflow is supported via a custom Survey123 Form to provide source location validation. The workflow starts with a Web Map that has a Popup configured to use geographic coordinates stored as attributes and pass those into this application as URL parameters as described above. The coordinates will be used by the Survey123 Form to calculate the distance to the current device location and then disable the OOKLA Speedtest question if the calculated distance is further away than the configured maximum distance threshold.
URL PARAMETER NAME | VALIDATION USAGE |
---|---|
source_longitude | longitude location value (WGS 84) |
source_latitude | latitude location value (WGS 84) |
Please note that the maximum distance threshold is set in the app configuration (part of the questionValue parameter), NOT a URL parameter.
CONFIGURATION PARAMETER NAME | VALIDATION USAGE | DEFAULT |
---|---|---|
max_distance | maximum distance threshold | 100 (feet) |
Please use this source validation Excel file for this scenario: Survey123Connect excel file
- No OAuth authentication implemented.
- REQUIRED: All ArcGIS Online items must be shared publicly.
If you have questions about this demo, please contact us.
For specific questions about Survey123 or broadband connectivity:
Patrick Ryan | Solution Engineer, Science-Civilian | Geospatial Center
Esri | 8615 Westwood Center Drive | Vienna, VA 22182 | USA
T 703 506 9515 x5070 | M 703 973 9600 | pryan@esri.com | esri.com
For specific questions about the JavaScript web application:
John Grayson | Prototype Specialist | Geo Experience Center
Esri | 380 New York St | Redlands, CA 92373 | USA
T 909 793 2853 x1609 | jgrayson@esri.com | GeoXC Demos | esri.com