Users should be able to access terms in all entered languages, but there are too many to always show them all. Therefore, they are categorized in "more languages" (by default expanded) and "all entered languages" (by default collapsed). To be able to know more about how users interact with the language terms, we want to track how often these links are being clicked.
**Sample screenshot with the two links**
[ ] Please get the percentage and total number, in how many page visits the "more languages" link was clicked at least once to collapse the languages. (So per page we only count "yes" or "no").
[ ] Please get the percentage and total number, in how many page visits the "more languages" link was clicked at least once to extend the languages again. (So per page we only count "yes" or "no").
[ ] Please get the percentage and total number, if "all entered languages" was clicked to expand the list. (We are not interested if the link was clicked multiple times or not)
Page visit = page visit of the non-crawler user with JS enabled (i.e. user visit with the possible intent to interact with the "termbox").
Example of mw.track in use can be found in WikibaseQualityConstraints.
mw.track( 'counter.MediaWiki.wikibase.quality.constraints.gadget.loadEntity' );
For our metrics we will use the metric names MediaWiki.wikibase.repo.ui.termBox.(moreLanguages|lessLanguages|allLanguages)
The JS will just have to remember if it has already counted the click for each of the 3 cases so that a single request will only ever log 1 click of each link type.
TBD cleanup definitions of pageviews (js no js etc?)