WebExtensions API:s | Engineering your add-on |
---|
This is the home of the shield-studies-addon-utils
npm package, which provides:
shield-study
telemetryValidate and send shield-study
, shield-study-addon
Telemetry, allowing experiments to submit experiment-scoped stringified key-value pairs that are directly available for analysis.
Validate, encrypt and send shield-study
, shield-study-addon
Pioneer Telemetry.
Validate telemetry payloads against JSON schemas and calculate the size of a ping before submitting it.
Helper classes and methods to write Selenium-based functional/unit tests for your study add-on.
For formatting 'post' and 'mid-study' survey URLs to have correct appended query arguments in the format that matches the corresponding SurveyGizmo library elements
Thinking about building a Study Add-on? Please read the docs on Pref-Flip and Add-On Experiments first.
npm install --save shield-studies-addon-utils
copyStudyUtils yourAddonSrc/privileged/
which copies webExtensionApis/study/api.js
and webExtensionApis/study/schema.json
to your add-on's source directory under yourAddonSrc/privileged/study
, "experiment_apis": {
"study": {
"schema": "./privileged/study/schema.json",
"parent": {
"scopes": ["addon_parent"],
"script": "./privileged/study/api.js",
"paths": [["study"]]
}
}
},
browser.study.*
browser.study
API documentation
Depending on which telemetry pipeline is used, the pings end up in different destinations:
shield
- The pings end up in the shield-study
and shield-study-addon
Telemetry buckets for instant access to submitted payloads via STMO.pioneer
- The pings are encrypted and end up in the Pioneer processing pipeline.event-telemetry
- The pings end up in the ordinary destination for event telemetry (Not Yet Implemented)browser.studyDebug.*
browser.studyDebug
API documentation
Used by the project-internal tests only.
npm test
must pass.browser.study.fullSurveyUrl()
* Some features that was handled in v5 has not been ported over to neither Normandy nor v6 of the utils: