PHP logging

EventLogging::logEvent( 'HomepageModule', 19375909, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"HomepageModule": 19375909
			}
		}
	}
}

JavaScript logging

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

Schema:HomepageModule

From Meta, a Wikimedia project coordination wiki
Revision 19375909
Jump to navigation Jump to search
description"Logs interactions with the homepage modules on the Special:Homepage provided by the GrowthExperiments extension"
properties
action
type"string"
requiredtrue
enum
"impression"
"hover-in"
"hover-out"
"link-click"
"open-nopageviews-tooltip"
"close-nopageviews-tooltip"
"close"
description"Action the user took: - impression: Module is shown to user - hover-in: User mouse pointer enters the element. - hover-out: User mouse pointer leaves the element - link-click: User clicks a link in the module - open-nopageviews-tooltip: User opens the tooltip on the shown when pageviews is not available yet. - close-nopageviews-tooltip: User closes the tooltip on the shown when pageviews is not available yet. - close: User closes then mobile overlay."
action_data
type"string"
description"Additional data for certain actions: For action=link-click: symbolic name of the link being clicked. n.b. for impact module links, we will not append a number for each link in the list. For mentorship module, we will add the mentor edit count and the unformatted timestamp that the editor was last active."
user_id
type"integer"
requiredtrue
description"The user id."
user_editcount
type"integer"
requiredtrue
description"The total number of edits of the user."
module
type"string"
enum
"start"
"start-account"
"start-tutorial"
"start-userpage"
"start-email"
"start-startediting"
"impact"
"help"
"mentorship"
requiredtrue
description"The module the user is interacting with"
state
type"string"
enum
"complete"
"incomplete"
"activated"
"unactivated"
"noemail"
"unconfirmed"
"confirmed"
requiredfalse
description"The state of the module the user is interacting with."
is_mobile
type"boolean"
requiredtrue
description"Whether the mobile site is being used."
mode
type"string"
enum
"desktop"
"mobile-summary"
"mobile-details"
"mobile-overlay"
requiredtrue
description"The rendering mode of the module."
homepage_pageview_token
type"string"
requiredtrue
description"One-time token per page load. This is a random user session ID that will be exported to the client-side when HomepageVisit events are recorded."