Schema:CitationUsage

PHP logging

EventLogging::logEvent( 'CitationUsage', 20164987, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"CitationUsage": 20164987
			}
		}
	}
}

JavaScript logging

mw.track( 'event.CitationUsage', { /* ... */ } );
From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Krinkle (talk | contribs) at 23:33, 11 June 2020 (domInteractive or dom_interactive_time, not domInteractiveTime). It may differ significantly from the current version.

Revision 20164987
description"Characterizing Wikipedia Citation Usage — https://meta.wikimedia.org/wiki/Research:Characterizing_Wikipedia_Citation_Usage"
properties
dom_interactive_time
type"integer"
description"Total length of time since the UNIX epoch (in milliseconds) when `document.readyState` changes to `interactive`, i.e. when the parser finished its work on the main document. Not all browsers support the `PerformanceTiming.domInteractive` API."
requiredtrue
event_offset_time
type"integer"
description"The number of milliseconds since `dom_interactive_time` spent on this page when the action occurred."
requiredtrue
action
type"string"
description"`extClick` — click on external URLs; `upClick` — click that takes the user from the reference at the bottom back to the anchor (e.g., “[1]”) in the main text (e.g., on “^”); `fnClick` — clicks on page-internal links (e.g., “[1]”) that take the user to the reference section at the bottom; `fnHover` — event when user hovers over (at least 1000ms) reference (e.g., “[1]”) in main page articles."
enum
"extClick"
"upClick"
"fnClick"
"fnHover"
requiredtrue
revision_id
type"integer"
description"Revision ID of the page where the event occurred in."
requiredtrue
page_id
type"integer"
description"The ID of the page where the event occurred in."
requiredtrue
namespace_id
type"integer"
description"The ID of the page's namespace where the event occurred in."
requiredtrue
section_id
type"string"
description"The ID of the section containing the link that was clicked/hovered-over; not required if the section is the Main Section."
requiredfalse
in_infobox
type"boolean"
description"Whether the action is happening in the infobox."
requiredtrue
link_text
type"string"
description"The text of the link; space normalized string within anchor element."
requiredtrue
link_url
type"string"
description"The URL of the link."
requiredtrue
link_occurrence
type"integer"
description"The number of times this link's href occurs on this page."
requiredtrue
ext_position
type"integer"
description"The ordinal 1-based position of this external link within the list of all external links on this page; required only when action is `extClick`."
requiredfalse
freely_accessible
type"boolean"
description"`true` if the clicked external link has a green 'Freely Accessible' icon next to it; required only when action is `extClick`."
requiredfalse
footnote_number
type"integer"
description"if this external link falls within a cited reference list, the ordinal 1-based position of the citation within the reference list; required only when action is `extClick`"
requiredfalse
citation_in_text_refs
type"integer"
description"If this external link is a cited reference, the number of times it's cited on the page. Count of (span[class='mw-cite-backlink']/a); required only when action is `extClick`."
requiredfalse
page_token
type"string"
description"One-time token per page load."
requiredtrue
session_token
type"string"
description"Session token that survives across pages (`mw.user.sessionId()`), but not browser restarts."
requiredtrue
referrer
type"string"
description"The URI of the page that linked to this page as reported by `document.referrer`."
requiredtrue
skin
type"string"
description"Skin being used by reader."
requiredtrue
mode
type"string"
description"Whether the user is in the desktop mode or mobile mode."
enum
"desktop"
"mobile"
requiredtrue