PHP logging

EventLogging::logEvent( 'HelpPanel', 19416163, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"HelpPanel": 19416163
			}
		}
	}
}

JavaScript logging

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

Schema:HelpPanel

From Meta, a Wikimedia project coordination wiki
Revision 19416163
Jump to navigation Jump to search
description"Logs interactions with the help panel displayed to new editors by the GrowthExperiments extension"
properties
action
type"string"
requiredtrue
enum
"impression"
"open"
"close"
"review"
"back-home"
"link-click"
"enter-question-text"
"submit-attempt"
"submit-success"
"submit-failure"
"cog-open"
"cog-close"
"search"
"search-focus"
description"Action the user took: - impression: Help button is shown to user - open: User opens panel - close: User closes panel - review: User advances from the home panel to the question review panel - back-home: User goes back from the question review panel to the home panel - link-click: User clicks a link in the panel - enter-question-text: User enters text into the question field - submit-attempt: User clicks the button to submit their question - submit-success: Question is successfully submitted - submit-failure: Question submission fails - cog-open: User opens the cog menu - cog-close: User closes the cog menu - search: User searches help content - search-focus: User focuses the search input"
action_data
type"string"
description"Additional data for certain actions: For action=link-click: symbolic name of the link being clicked For action=submit-attempt: an object consisting of the following fields: - question_length: character count of the question - include_title: whether the option to include the title was used - had_email: whether the user had an email address set when before posting the question - had_email_confirmed: whether that address was confirmed - email_form_has_content: whether the email field was non-empty - email_form_changed: whether the user has changed the email field For action=submit-success: an object consisting of the following fields: - revision_id: revision ID of the edit adding the question - email_action_status: the outcome of trying to set a working email address for the user; one of set_email_with_confirmation (the users email address was set and a confirmation email sent out), send_confirm (the confirmation email was resent), already_confirmed (the confirmation email was supposed to be resent but the users email is already confirmed), no_op (nothing to do)"
user_id
type"integer"
requiredtrue
description"The user id."
user_editcount
type"integer"
requiredtrue
description"The total number of edits of the user."
editor_interface
type"string"
enum
"visualeditor"
"wikitext-2017"
"wikitext"
"reading"
"homepage_help"
"homepage_mentorship"
"other"
requiredtrue
description"The editor interface through which the user is attempting to edit the page."
is_mobile
type"boolean"
requiredtrue
description"Whether the mobile site is being used."
page_id
type"integer"
requiredtrue
description"ID of the page the user is attempting to edit."
page_title
type"string"
requiredtrue
description"Full title of the page the user is attempting to edit, including namespace (wgPageName format). This is needed to log edit activity on redlinks, as pageId is not available."
page_ns
type"integer"
requiredtrue
description"Namespace ID of the page the user is attempting to edit."
user_can_edit
type"boolean"
requiredtrue
description"Whether the user is allowed to edit the page. This will be false if e.g. the page is protected or the user is blocked."
page_protection
type"string"
description"For protected pages, the permission level required to create, edit, or move the page. Unset for unprotected pages."
session_token
type"string"
requiredtrue
description"Session token that survives across pages (mw.user.sessionId()), but not browser restarts, used in deterministic user bucketing. This will only be set for client-side (JavaScript-generated) events, for server-side events the value will be an empty string."
help_panel_session_id
type"string"
requiredtrue
description"One-time token per page load. This is like page_token and has the same behavior, but it isn't obtained through getPageViewToken(), so its value is different."