PHP logging

EventLogging::logEvent( 'MobileWikiAppLinkPreview', 18531254, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"MobileWikiAppLinkPreview": 18531254
			}
		}
	}
}

JavaScript logging

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

Schema:MobileWikiAppLinkPreview

From Meta, a Wikimedia project coordination wiki
Revision 18531254
Jump to navigation Jump to search
description"Track user actions when using the link preview."
properties
action
description"Which particular action triggered this event: - linkclick: the user clicked on a link, and a link preview was shown - navigate: the user navigated to an article via a link (either by following through a link preview, or following a link elsewhere in the app). - cancel: the link preview was dismissed without navigating to the target article. - disabled: The user has disabled link previews in Settings. This means that the user clicked a link, and a preview *should* have been shown, but wasn't because link previews are disabled."
enum
"linkclick"
"navigate"
"cancel"
"disabled"
type"string"
requiredtrue
time_spent
description"Amount of time, in seconds, that the link preview remained on the screen. This value is only present for the 'navigate' and 'cancel' actions."
type"integer"
requiredfalse
source
description"The source from which the link was invoked. This maps to the HistoryEntry enumeration found in our code."
type"integer"
requiredtrue
session_token
description"Session token for this preview funnel."
type"string"
requiredtrue
page_id
description"The ID of the page to which the link preview applies."
type"integer"
requiredtrue
app_install_id
description"Randomly generated UUID that is unique to each app install, which can be used to cross-reference the same app install across different schemas."
type"string"
requiredtrue
client_dt
description"Client-side ISO-8601-formatted date-time at which this event occurred."
type"string"
requiredtrue
version
description"Revision of the link preview functionality that was presented to the user. The current version is 3."
type"integer"
requiredtrue