PHP logging

EventLogging::logEvent( 'UniversalLanguageSelector', 17799034, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"UniversalLanguageSelector": 17799034
			}
		}
	}
}

JavaScript logging

mw.track( 'event.UniversalLanguageSelector', { /* ... */ } );

Schema:UniversalLanguageSelector

From Meta, a Wikimedia project coordination wiki
Revision 17799034
Jump to navigation Jump to search
description"Schema for ULS extension events. Currently this covers both various actions as well as events that log usage of certain fonts, input methods and languages."
properties
version
type"integer"
requiredtrue
description"Version number. This field can be used to track changes in instrumentation that affect the nature of the data collected."
token
type"string"
description"Username for logged in users or session token for anonymous users"
requiredtrue
action
type"string"
description"What the user caused or did: * ime-change: User changed the used input method. Switching input method on and off via Ctrl-M is also considered a change from/to 'system' input method. The ime id is stored in the inputMethod field. * ime-disable: User completely disabled input method functionality via ULS settings. * ime-enable: User completely enabled input method functionality via ULS settings. * language-change: User changes a language for something. The something is defined in the context field. Also the languageSelectionMethod field is filled. * font-change: User changes a font. Both contentFont and interfaceFont fields are populated. Those can be mapped to languages by inspecting the interfaceLanguage and contentLanguage fields. * no-search-result: User searched for a language with no results. The search string is stored in the context field. The page title is stored in the title field. The ulsPurpose is stored in the ulsPurpose field to understand what was the purpose of the language search: interlanguage links, IME, etc. * login-click: Anonymous user clicked login link in ULS when configured in a way that anons cannot change language. * settings-open: User opened ULS settings. The location where they were opened is stored in the context field. * ui-lang-revert: User reverted the interface language change via tooltip. * more-languages-access: Used accessed "..." to get more languages for something. The something is defined in the context field. * webfonts-enable: User enabled the webfonts functionality via ULS settings. * webfonts-disable: User completely disabled the webfonts functionality via ULS settings."
enum
"ime-change"
"ime-enable"
"ime-disable"
"language-change"
"font-change"
"no-search-results"
"login-click"
"settings-open"
"ui-lang-revert"
"more-languages-access"
"webfonts-enable"
"webfonts-disable"
requiredtrue
context
type"string"
description"Arbitrary action related data clarifying the context. * language-change: ** interface - user changed interface language ** content - user changed content language ** ime - user changed input language ** other - any other language selection via ULS * no-search-results: The search string * settings-open: ** personal - uls trigger in personal tools ** interlanguage - uls cog trigger in interlanguage section of sidebar ** menu - the input tools popup menu ** preferences - from link in Special:Preferences language selection * more-languages-access: Same as for language-change"
requiredfalse
ulsPurpose
type"string"
description"An identifier for the ULS panel. Defined as the ulsPurpose option in ULS initialization. Used with the no-search-results action to understand in what context did the person search for a language."
requiredfalse
title
type"string"
description"Page title. Used with no-search-results to analyze on which pages do people search for a page in a different language."
requiredfalse
interfaceLanguage
type"string"
description"Language code of current interface language"
requiredtrue
contentLanguage
type"string"
description"Language code of current content language"
requiredtrue
inputMethod
type"string"
description"Input method identifier or 'system'"
requiredfalse
contentFont
type"string"
description"Font name or 'system'"
requiredfalse
interfaceFont
type"string"
description"Font name or 'system'"
requiredfalse
languageSelectionMethod
type"string"
description"How was the language selected. * Null if none of the below were used. * map - user clicked the map * search - user used the search filed * common - user clicked from the list of common languages"
requiredfalse
enum
"map"
"search"
"common"