PHP logging

EventLogging::logEvent( 'PageIssues', 18392542, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"PageIssues": 18392542
			}
		}
	}
}

JavaScript logging

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

Schema:PageIssues

From Meta, a Wikimedia project coordination wiki
Revision 18392542
Jump to navigation Jump to search
description"Collect data to understand user behavior around page issue notices on mobile web (defined and detected via the CSS class table.ambox, see https://www.mediawiki.org/wiki/Reading/Web/Projects/Mobile_Page_Issues and https://phabricator.wikimedia.org/T191532)"
properties
pageTitle
type"string"
description"Title of the page"
requiredtrue
sectionNumbers
type"array"
requiredtrue
description"Which section each issue template is located in. Cf. https://phabricator.wikimedia.org/T202098 . Like `issuesSeverity` (below), this can have multiple elements for `pageLoaded` events, but only one for `issueClicked` and `modal` events. This array should be consistent with severities, except on modalClose (see description field for issuesSeverity)."
items
type"integer"
description"Number of the section. 0 for lead section (issues at top of page)."
requiredtrue
namespaceId
type"integer"
requiredtrue
description"Namespace ID of the page (will usually be mainspace)"
pageIdSource
type"integer"
requiredtrue
description"Page ID of the page"
isAnon
type"boolean"
description"Whether the user is anonymous or logged in"
requiredtrue
action
type"string"
enum
"pageLoaded"
"issueClicked"
"editClicked"
"modalRedLinkClicked"
"modalInternalClicked"
"modalEditClicked"
"modalClose"
description"`pageLoaded` happens once per page load, as soon as the instrumentation is active. `issueClicked` happens when the user taps the issue notice, opening the modal. `editClicked` happens when the user starts editing the page using the generic edit buttons (either the one for the whole page, or one for a section). `modalInternalClicked` happens when the user taps an internal link on the modal (usually to the Wikipedia: or Help: namespace). `modalEditClicked` happens when the user taps the edit link (which is not a red link) included on the modal ('improve this article') `modalRedLinkClicked` will occur when the user taps any red links included on the modal. `modalClose` happens when the user taps the 'X' to close the modal."
requiredtrue
issuesVersion
type"string"
description"The version of the page issues design that was shown to the user (currently only 'old' for the look that is the default as of mid 2018, or 'new2018' for the new design to be introduced later in 2018)"
requiredtrue
issuesSeverity
type"array"
description"Describes the severity level of the issues currently on display on the page. Could be multiple on pageload, but only one for `issueClicked` and `modal` events. There is one exception, in case several issues are combined into a 'multiple issues' template (https://en.wikipedia.org/wiki/Template:Multiple_issues ). This hides the information about the individual issues until the overlay modal is opened, except the maximum severity level of these child issues, which yields the severity level shown in the 'multiple issues' box. This level will be logged for the `pageLoaded`, `editClicked` and `issueClicked` actions. But once the modal has opened, the child issues become visible, and `modalEditClicked`, `modalRedLinkClicked` and `modalInternalClicked` actions will refer to an individual child issue instead. When the modal is closed, the value of `issuesSeverity` and `sectionNumbers` in the `modalClose` event will refer all the now displayed child issues, and thus be inconsistent with the `issueClicked` event that caused the opening of the overlay. Note: The severity level values may only be reliable on enwiki."
requiredtrue
items
type"string"
description"One or more of `HIGH`, `MEDIUM`, `LOW`, `DEFAULT`."
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"
requiredtrue
pageToken
type"string"
description"One-time token per page load (consistent with Schema:ReadingDepth and other schemas that use https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.user-method-getPageviewToken )."
requiredtrue
sessionToken
type"string"
description"Session token that survives across pages (mw.user.sessionId()), but not browser restarts, used in deterministic user bucketing"
requiredtrue