title: analytics/legacy/searchsatisfaction description: > Tracks the dwell time and bounce rate of a user on pages linked from a search engine result page. Legacy metawiki schema: https://meta.wikimedia.org/wiki/Schema:SearchSatisfaction $id: /analytics/legacy/searchsatisfaction/1.1.0 $schema: 'https://json-schema.org/draft-07/schema#' type: object additionalProperties: false required: - $schema - event - meta properties: revision: description: Revision ID of event schema. Deprecated. type: integer minimum: -9007199254740991 maximum: 9007199254740991 $schema: description: > A URI identifying the JSONSchema for this event. This should match an schema's $id in a schema repository. E.g. /schema/title/1.0.0 type: string http: type: object properties: method: description: 'The HTTP request method (GET, POST, etc.)' type: string status_code: description: The HTTP status code returned for this request (when known) type: integer minimum: -9007199254740991 maximum: 9007199254740991 client_ip: description: The http client's IP address type: string has_cookies: description: True if the http request has any cookies set type: boolean request_headers: description: 'Request headers sent by the client. E.g. user-agent, etc.' type: object additionalProperties: type: string response_headers: description: Response headers sent back to the client (when known). type: object additionalProperties: type: string client_dt: type: string format: date-time maxLength: 128 description: > ISO-8601 formatted timestamp of when the event occurred/was generated in UTC). This exists separately from meta.dt in the main common schema. For external client-sent instrumentation events, we want to allow meta.dt to be the received time (filled in by EventGate at ingest time), as we don't trust client-sent events to always set the proper date and time. Client-set event generation time should be set here instead. See: https://phabricator.wikimedia.org/T240460 wiki: description: $wgDBName e.g. enwiki type: string webHost: description: >- Request host. 'window.location.hostname' on client-side events; $_SERVER['HTTP_HOST'] on server. type: string schema: description: Title of event schema. Deprecated. type: string meta: type: object required: - dt - stream properties: uri: type: string format: uri-reference maxLength: 8192 description: Unique URI identifying the event or entity request_id: description: Unique ID of the request that caused the event type: string id: description: Unique ID of this event type: string dt: type: string format: date-time maxLength: 128 description: 'UTC event datetime, in ISO-8601 format' domain: description: Domain the event or entity pertains to type: string minLength: 1 stream: description: Name of the stream/queue/dataset that this event belongs in type: string minLength: 1 topic: description: The queue topic name this event belongs in. Deprecated. type: string recvFrom: description: Hostname of server emitting the log line. Deprecated. type: string dt: description: 'UTC ISO-8601 timestamp of event. Deprecated, use meta.dt.' type: string format: date-time maxLength: 128 seqId: description: Udp2log sequence ID. Deprecated. type: integer minimum: -9007199254740991 maximum: 9007199254740991 uuid: description: 'Unique event identifier. Deprecated, use meta.id.' type: string maxLength: 128 ip: description: > Client IP address that sent this event, usually best guess parsed out of from X-Client-IP header which is set by varnish from X-Forwarded-For. Deprecated, use http.client_ip. type: string event: type: object required: - action - searchSessionId - pageViewId - scroll - mwSessionId - source - uniqueId properties: mwSessionId: description: >- MediaWiki session id for correlating together actions in other schemas, such as QuickSurveys. type: string action: type: string 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. pageViewId: description: >- A unique identifier generated per visited page. This allows a visitPage and checkin events to be directly correlated. type: string scroll: description: >- Indicates if the user has scrolled the page since the last event with the same pageId type: boolean checkin: 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). type: integer minimum: -9007199254740991 maximum: 9007199254740991 query: description: >- The actual terms the user searched for. This is only logged with searchResultPage actions type: string hitsReturned: description: >- The number of results returned and shown in the SERP. This is only logged with searchResultPage actions type: integer minimum: -9007199254740991 maximum: 9007199254740991 articleId: description: >- The mediawiki article id of the current page, if the current page is an article. type: integer minimum: -9007199254740991 maximum: 9007199254740991 position: description: >- The position of the search result in the search result set, including any offsets. type: integer minimum: -9007199254740991 maximum: 9007199254740991 subTest: description: The name of any sub-test that this user is participating in. type: string searchSessionId: 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. type: string source: type: string enum: - autocomplete - fulltext description: >- The type of search that triggered the event. Either autocomplete or fulltext. inputLocation: 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) type: string didYouMeanVisible: description: >- Sent with full text searchResultPage events. Indicates which did you mean options, if any, are presented to the user on this page. type: string autocompleteType: description: >- The type of search that was performed for autocomplete. Sent with searchResultPage events with a source of autocomplete. type: string msToDisplayResults: 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. type: integer minimum: -9007199254740991 maximum: 9007199254740991 searchToken: description: >- Token, primarily for debugging, which associates a search to a log in the CirrusSearchRequestSets hive table type: string extraParams: description: >- Allows for additional parameters: - 'completion-suggest-on' if user has opted-in to the Completion Suggester beta feature - NULL otherwise type: string uniqueId: 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. type: string isForced: 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. type: boolean sampleMultiplier: description: >- Account for sampling by reporting a multiplier representing the number of events this should count as. type: number minimum: -9007199254740991 maximum: 9007199254740991 examples: - event: uniqueId: cb271b4b1ec0c5c83e84k8j4xj6o action: visitPage searchSessionId: 637f1345d71834b06463k8j4of7t pageViewId: 9b8c9ab1b52c21e966edk8j4xj6f scroll: false mwSessionId: ee4f8d334a450a0fe63e source: fulltext sampleMultiplier: 1 articleId: 4 position: 0 searchToken: 4cqr8vzf5t0g1boh1k9cckz2c query: test test test schema: SearchSatisfaction webHost: dev.wiki.local.wmftest.net wiki: wiki $schema: /analytics/legacy/searchsatisfaction/1.1.0 meta: dt: '2020-04-02T19:11:20.942Z' stream: eventlogging_SearchSatisfaction id: b0caf18d-6c7f-4403-947d-2712bbe28610 request_id: bd54dd80-7515-11ea-98e5-fd72443e8b45 dt: '2020-04-02T19:11:20.942Z' http: client_ip: 10.0.2.2 request_headers: user-agent: >- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36