T370880
In order to associate user interactions (event data) to experiments, we need a way of recording that membership data. We also need that way to support membership in multiple concurrent experiments. After evaluating two potential data modeling approaches based on complexity of analysis and implementation, ability to extend the model in the future, and performance considerations, we decided that membership should be recorded using the following data model:
```
experiments: struct<
enrolled: array<string>,
assigned: map<string, string>
[, [property]: map<string, [type]>]
>
```
where:
- `enrolled` is an array of names of all experiments that the subject is currently enrolled in
- `assigned` is a map of which experiment groups (variants) the subject has been assigned to
- the key is the experiment name present in the `enrolled` array
- the value is the assigned experiment group (variant)
- any additional properties would store additional data about the experiments using the same model as `assigned`, where the keys match the values found in the `enrolled` array.
More details in the [[ https://docs.google.com/document/d/1MJMwqksZJOXRPGz0Qfj7DWq7GAHXMo_X1Qb7cmp3QBM/edit | decision record ]].
=== Requirements
[] Schema updates
[] Schema fragment
[] Integrated into base schemas
[] Client library updates
[] JS
[] PHP
[] Java (Android)
[] Documentation updates
[] [[ https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_An_Instrument#Writing_MediaWiki_instrumentation_code_using_the_EventLogging_extension | Writing MediaWiki instrumentation code using the EventLogging extension ]]
[] [[ https://wikitech.wikimedia.org/wiki/Metrics_Platform/How_to/Create_An_Instrument#Writing_MediaWiki_instrumentation_code_for_apps | Writing MediaWiki instrumentation code for apps ]]
[] https://wikitech.wikimedia.org/wiki/Metrics_Platform/Implementations