PHP logging

EventLogging::logEvent( 'DesktopWebUIActionsTracking', 20990591, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"DesktopWebUIActionsTracking": 20990591
			}
		}
	}
}

JavaScript logging

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

Schema:DesktopWebUIActionsTracking

From Meta, a Wikimedia project coordination wiki
Revision 20990591
Jump to navigation Jump to search
description"Logs when certain UI elements get visible and when user interacts with those on desktop"
properties
action
type"string"
description"Type of interaction. `Shown` is special interaction, not triggered by user. It can be sent to mark that given dynamic UI element got presented to the user"
enum
"init"
"click"
requiredtrue
skin
type"string"
description"The skin. Right now the schema is only used on Vector, but this is reserved for future usage."
requiredfalse
skinVersion
type"integer"
description"The skin version. 1 = legacy. 2 = modern."
requiredfalse
name
type"string"
description"Uniquely describes the thing that was interacted. Clicks on element with `data-event-name` attribute will be automatically tracked, using `data-event-name` as `name`. Not required for init events."
requiredfalse
token
type"string"
requiredtrue
description"Session token that survives across pages (mw.user.sessionId()), but not when browser restarts."
isSidebarCollapsed
type"boolean"
description"Is the sidebar collapsed?"
requiredtrue
isAnon
type"boolean"
description"Is the user viewing anonymously?"
requiredtrue
editCountBucket
type"string"
description"Number of edits by user. Set only if user is logged in."
enum
"0 edits"
"1-4 edits"
"5-99 edits"
"100-999 edits"
"1000+ edits"
requiredfalse