The EditAttemptStep instrument is a candidate for migration to the
Metrics Platform [0]. The first step of the migration is to log events
both using the Event Platform (i.e. via mw.eventLog.submit()) and using
the Metrics Platform Client (i.e. via mw.eventLog.dispatch()).
The Metrics Platform Client can mix in additional information -
so-called context attribute [1] - based on the stream configuration. The
majority of the default values mixed into each event via the
mw.eventLog.Schema defaults mechanism are already known to the Metrics
Platform Client.
Note well that the Metrics Platform Client will not log an event without
one or more streams being configured to receive that event. Therefore,
this change is a NOP.
An example stream configuration is given in [2].
[0] https://wikitech.wikimedia.org/wiki/Metrics_Platform
[1] https://gerrit.wikimedia.org/g/mediawiki/libs/metrics-platform/+/aed6738b845/js/src/StreamConfig.d.ts#31
[2] https://phabricator.wikimedia.org/T309013#7953227
Bug: T309013
Change-Id: Ic88225111132b440657aab85c34b36a642a7e602
For logged out users we store their test state and an anonymous
identifier in local storage. So long as the test is enabled, we include
these in any logging that occurs.
This is done entirely client-side, to avoid any cache issues caused by
state depending on cookies from PHP for logged out users.
Bug: T291307
Change-Id: Ib39e2f2146cdfdac9df5690ee3de75718f0f2731
Same pattern as is now used in VisualEditor. Generate an initial session
ID when the file loads, so if any VisualEditorFeatureUse events trigger
before the init there'll be a session ID for them to use.
Bug: T275051
Change-Id: I4f25e9e1e195c11129044868eb67fcc2f4494ffd
If DiscussionToolsABTest is enabled (set to `all` or a feature), logged
in users who have never used the tool before will be assigned to an a/b
test bucket. If they're in the test bucket, they get the feature
enabled.
If they manually set their beta feature preference, we don't override
that but do maintain their bucket for logging purposes.
Bug: T268191
Change-Id: I9c4d60e9f9aaef11afa7f8661b9c49130dde3ffa
Also, stop the dialog-prevent-show event from switching editor_interface
just because it's tied to the `editor-switch` feature.
Bug: T259673
Change-Id: I2acf9d79add281ed0f62f022e44bb18948ceafc8