== Background
We will be reusing the search satisfaction schema to perform **two** A/B tests on our changes to search:
1. The first on the new location of the search widget.
2. The second on the new widget / experience we're currently building in Vue.js.
These two A/B tests together support four possible configurations:
| **Skin version** | **Search version** | **Description** |
| `1` | `"legacy"` | Vector Legacy skin with Legacy search (current master) |
| `2` | `"legacy"` | Vector Latest skin with Legacy search (current master) |
| `2` | `"moved"` | Vector Latest skin with Legacy search and latest location |
| `2` | `"new"` | Vector Latest skin with Latest search and latest location |
Both A/B tests will be executed in Vector's "Latest" (v2) mode only and compared to the Legacy mode (v1). In order to do this, we need to be able to distinguish between the old and new versions of the skin. As such, this task requires that a new skin version field be added. This field will only be needed for the search project and could be deleted later.
For the second test only, search can be configured within Vector's Latest mode to use the new experience (Vue.js) or the old experience. This will be set by wiki for at least logged-in users, although logged-in + anon is preferred. These will be distinguished in instrumentation by the addition of a second field for search version. We will also monitor the opt-in / out rate when new search is enabled and disabled.
== Acceptance criteria
[] Add a skin version field to [[ https://gerrit.wikimedia.org/r/plugins/gitiles/schemas/event/secondary/%2B/master/jsonschema/analytics/legacy/searchsatisfaction/ | /analytics/legacy/searchsatisfaction ]]
[] Add a search version field to [[ https://gerrit.wikimedia.org/r/plugins/gitiles/schemas/event/secondary/%2B/master/jsonschema/analytics/legacy/searchsatisfaction/ | /analytics/legacy/searchsatisfaction ]]
Once the schema is updated, the version will also need to be updated in [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/WikimediaEvents/+/refs/heads/master/extension.json | extension.json in WikimediaEvents ]]:
```lang=JSON
"attributes": {
"EventLogging": {
"Schemas": {
"SearchSatisfaction": "/analytics/legacy/searchsatisfaction/1.1.0",
```
and [[ https://gerrit.wikimedia.org/r/plugins/gitiles/operations/mediawiki-config/+/master/wmf-config/InitialiseSettings.php | InitialiseSettings.php in mediawiki-config/wmf-config ]]:
```lang=PHP
'wgEventLoggingSchemas' => [
'default' => [
'SearchSatisfaction' => '/analytics/legacy/searchsatisfaction/1.1.0',
],
],
```
= Developer notes
- To access skin version reusing the logic in [[ https://gerrit.wikimedia.org/g/mediawiki/extensions/WikimediaEvents/+/80cf24e343898c0b5bc1bacd834983004f04ca9c/modules/ext.wikimediaEvents/desktopWebUIActions.js#30 | modules/ext.wikimediaEvents/desktopWebUIActions.js ]] should work for now