The option ulsPurpose was added to ULS recently. The goal of this option is to identify each instance of ULS for logging and understanding its usage better.
It must be specified in the initialization JS function, .uls().
It was added to the UniversalLanguageSelector extension itself. Examples:
- https://gerrit.wikimedia.org/r/#/c/416365/7/resources/js/ext.uls.displaysettings.js
- https://gerrit.wikimedia.org/r/#/c/416365/7/resources/js/ext.uls.compactlinks.js
Now it must also be added to usages of ULS in other extensions used by Wikimedia:
- Wikibase (apparently, it doesn't seem to be used as a panel anywhere, although ULS's langdb is used in many places)
- ContentTranslation (patch)
- UploadWizard (patch)
- Translate (patch)
- TwnMainPage (not deployed on Wikimedia sites, but related enough) (patch)
- CleanChanges (not deployed on Wikimedia sites, but related enough) (patch)
The new identifiers must be added to https://www.mediawiki.org/wiki/Universal_Language_Selector/Analytics .