@Catrope in this Slack thread:
Is it known/expected that the reusable instrumentation for edit_saved events in editSaved.js is incomplete, and does not capture edits that were not made through VisualEditor? Is a server-side version of this instrument available? (I'm guessing it was implemented client-side so that it could be used for edge-unique experiments too, but I'm doing an mw-user experiment so I can log events server-side.)
…
To make the JS instrument work correctly, we probably need to set an mw.config var or query string param on the page the user lands on after submitting an edit through the old wikitext editor
That is, currently editSaved only sends edit_saved events when these two hooks fire:
- ve.newTarget (save specifically)
- mobileFrontend.sourceEditor.saveComplete
Proposed solution
AC
- postEdit hook optional data includes:
- revision ID of the corresponding edit
- namespace ID of the corresponding edit
- self-identified editing interface name (following some conventions)
- additional contextual data object
- Changes are compatible with existing postEdit evokers (source editor, VE, mobile editor) and downstream subscribers
- Popular editing interfaces integrate the updated postEdit hook and self-identify (name) (see legacy/editattemptstep for reference)
- VisualEditor (visualeditor?)
- Mobile editor (mobile_editor or mobile_visualeditor?)
- Wikitext source editor (wikitext?)
- editSaved subscribes to the new postEdit hook and uses the accompanying data to fill out:
- revision ID => page.revision_id
- editing interface => action_source
- interface-specific contextual data object => JSON.stringify() => action_context