Jump to content

Schema:SearchSatisfaction

PHP logging

EventLogging::logEvent( 'SearchSatisfaction', 20876997, $event );

extension.json setup for JavaScript logging

{
	"attributes": {
		"EventLogging": {
			"Schemas": {
				"SearchSatisfaction": 20876997
			}
		}
	}
}

JavaScript logging

mw.track( 'event.SearchSatisfaction', { /* ... */ } );
From Meta, a Wikimedia project coordination wiki
Revision 20876997
description"Tracks the dwell time and bounce rate of a user on pages linked from a search engine result page."
properties
action
type"string"
requiredtrue
enum
"searchResultPage"
"visitPage"
"checkin"
"click"
"iwclick"
"ssclick"
"esclick"
"hover-on"
"hover-off"
description"Identifies the context in which the event was created. Every time a new search is performed a searchEngineResultPage event is created. When the user clicks a link in the results a visitPage event is created. When the user has dwelled for N seconds (see 'checkin' below) a checkin event occurs. If the user clicks an interwiki result provided by TextCat language detection, there is a iwclick event. If the user clicks on a sister search result from the sidebar, that's an ssclick. If the user interacts with a result to explore similar (pages, categories, translations), there are hover-on, hover-off, and esclick events."
searchSessionId
type"string"
requiredtrue
description"A unique identifier generated per search session. A search session identifies a single user performing searches within a limited timespan. If no search is performed within ten minutes of a previous search a new session id is generated."
pageViewId
type"string"
requiredtrue
description"A unique identifier generated per visited page. This allows a visitPage and checkin events to be directly correlated."
scroll
type"boolean"
requiredtrue
description"Indicates if the user has scrolled the page since the last event with the same pageId"
checkin
type"integer"
requiredfalse
description"A numeric value representing the number of seconds a user has spent on a page. As with Schema:TestSearchSatisfaction2, the pings are at 10s, 20s, ..., 50s, 60s, 90s, 120s (2min), 150s, 180s (3min), 210s, 240s (4min), 300s (5min), 360s (6min), 420s (7min)."
query
type"string"
requiredfalse
description"The actual terms the user searched for. This is only logged with searchResultPage actions"
hitsReturned
type"integer"
requiredfalse
description"The number of results returned and shown in the SERP. This is only logged with searchResultPage actions"
articleId
type"integer"
requiredfalse
description"The mediawiki article id of the current page, if the current page is an article."
position
type"integer"
requiredfalse
description"The position of the search result in the search result set, including any offsets."
subTest
type"string"
requiredfalse
description"The name of any sub-test that this user is participating in."
mwSessionId
type"string"
requiredtrue
description"MediaWiki session id for correlating together actions in other schemas, such as QuickSurveys."
source
type"string"
requiredtrue
enum
"autocomplete"
"fulltext"
description"The type of search that triggered the event. Either autocomplete or fulltext."
inputLocation
type"string"
requiredfalse
description"Sent with searchResultPage events. For autocomplete, identifies the location(header, or Special:Search main input) of the autocomplete that was used. For full text indicates the location of the 'did you mean' that was used (either autorewrite, suggestion, original, or rewritten)"
didYouMeanVisible
type"string"
requiredfalse
description"Sent with full text searchResultPage events. Indicates which did you mean options, if any, are presented to the user on this page."
autocompleteType
type"string"
requiredfalse
description"The type of search that was performed for autocomplete. Sent with searchResultPage events with a source of autocomplete."
msToDisplayResults
type"integer"
requiredfalse
description"The number of milliseconds it took between requesting results and showing them to the user in a searchResultPage event. This is always reported for autocomplete events and is only reported on browsers supporting the navigation timing api for full text."
searchToken
type"string"
requiredfalse
description"Token, primarily for debugging, which associates a search to a log in the CirrusSearchRequestSets hive table"
extraParams
type"string"
requiredfalse
description"Allows for additional parameters: • 'completion-suggest-on' if user has opted-in to the Completion Suggester beta feature • NULL otherwise"
uniqueId
type"string"
requiredtrue
description"A unique id per-event to allow deduplicating events that are sent multiple times. This happens in particular with IE where we emulate sendBeacon and often enough send click events twice."
isForced
type"boolean"
requiredfalse
description"A way to flag events that came from a user who entered themselves into search satisfaction logging. For example, when we want to debug or test new code."
sampleMultiplier
type"number"
requiredfalse
description"Account for sampling by reporting a multiplier representing the number of events this should count as."