PHP logging

EventLogging::logEvent( 'MobileWikiAppSearch', 15729321, $event );

extension.json setup for JavaScript logging

{
	"EventLoggingSchemas": {
		"MobileWikiAppSearch": 15729321
	}
}

JavaScript logging

mw.eventLog.logEvent( 'MobileWikiAppSearch', { /* ... */ } );

Schema:MobileWikiAppSearch

From Meta, a Wikimedia project coordination wiki
Revision 15729321
Jump to: navigation, search
description"Track user actions when using the search interface"
properties
action
description"Which particular action triggered this event -start - the user started a search -results - search results were shown to the user as a result of explicit user input -didyoumean - the user clicked the 'did you mean' link shown above full-text results -autoswitch - the user got no results from a prefixsearch, and was automatically switched to fulltext mode -error - the user was presented with an error -click - the user clicked on a search result -cancel - the user aborted their search by clicking cancel or hitting back"
enum
"start"
"results"
"didyoumean"
"autoswitch"
"error"
"click"
"cancel"
type"string"
requiredtrue
source
description"The source from which the Search interface was invoked: 0 - Main article toolbar, 1 - Widget, 2 - Share intent, 3 - Process-text intent, 4 - Floating search bar in the feed, 5 - Voice search query."
type"integer"
requiredtrue
position
description"The position of the search result that was selected, from the list that was presented to the user (used with the 'click' action)."
type"integer"
requiredfalse
typeOfSearch
description"The type of search that was run (used with 'results' and 'error') -prefix - prefix (title only) search -full - full-text search"
type"string"
requiredfalse
numberOfResults
description"The number of results that the user was shown as a result of their input"
type"integer"
requiredfalse
timeToDisplayResults
description"The number of milliseconds it took, from the app's/user's point of view, between sending the query and actually displaying the results"
type"integer"
requiredfalse
searchSessionToken
description"Session token for this Search funnel"
type"string"
requiredtrue
appInstallID
description"AppInstallID that's unique to each app install and is used to track user across this and other features in the mobile app"
type"string"
requiredtrue