Readers Web are increasing the scope of the UniversalLanguageSwitcher instrument as part of T275766: Log sessionID, isAnon, editBucketCount, and selectedLanguage properties in the UniversalLanguageSelector instrument and T275762: Instrument clicks to links in the Languages list in the sidebar. In order to keep the UniversalLanguageSwitcher extension focussed, we (@nshahquinn-wmf, @Nikerabbit, and Readers Web) agreed that the instrument should be moved to the WikimediaEvents extension.
- The UniversalLanguageSwitcher instrument is moved to the WikimediaEvents extension
- The UniversalLanguageSwitcher is loaded when the skin isn't minerva
- Navigate to https://en.wikipedia.beta.wmflabs.org
- Log in
- Navigate to https://en.wikipedia.beta.wmflabs.org/wiki/Main_Page
- Click on the cog icon next to "Languages" in the sidebar
- Observe that a settings-open UniversalLanguageSwitcher event was logged
- Change your display language
- Observe that a language-change UniversalLanguageSwitcher event was logged
You'll need to run mw.trackSubscribe( 'event.UniversalLanguageSelector', ( _, event ) => console.log( JSON.stringify( event, null, 2 ) ) ); in order to inspect UniversalLanguageSelector events that are going to be logged prior to the browser navigating to a new page.
the ULS code that needs to be ported is here: