PHP logging

EventLogging::logEvent( 'WikidataCompletionSearchClicks', 18665070, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"WikidataCompletionSearchClicks": 18665070
			}
		}
	}
}

JavaScript logging

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

Schema:WikidataCompletionSearchClicks

From Meta, a Wikimedia project coordination wiki
Revision 18665070
Jump to navigation Jump to search
description"Schema to anonymously track clicks from Wikidata completion searches"
properties
action
description"The action performed by a user"
type"string"
requiredtrue
pageToken
description"A random token generated per page load to identify related events"
type"string"
requiredtrue
searchTerm
description"The string the user was searching for"
type"string"
requiredtrue
language
description"Search language"
type"string"
requiredtrue
searchResults
description"Comma-separated list of page IDs that were suggested to the user as an option"
type"string"
requiredtrue
clickIndex
description"The 1-based index of the search result that the user clicked on."
type"integer"
requiredfalse
clickPage
description"The page ID of the search result that the user clicked on."
type"integer"
requiredfalse
context
description"The context for the search, e.g. top, item, property, lexeme, etc."
type"string"
requiredtrue
searchId
description"The ID of the search request"
type"string"
requiredfalse
bucket
description"AB test bucket event is assigned to"
type"string"
requiredfalse