Page MenuHomePhabricator

Add new fields to searchsatisfaction2 schema
Closed, ResolvedPublic

Description

The user satisfaction backup KPIs would benefit from some extra data in the EventLogging table. Our proposed additions are:

  1. A per-user UUID that persists for longer than the search session - probably 24 hours.
  2. The (unhashed) search query that the user submitted. (Needed just once per SERP.)
  3. The actual ID (not a pseudorandom ID) of the page that was landed on.
  4. Number of results returned to the user. (Needed just once per SERP.)
  5. The rank of the visited page as it was on SERP.
  6. For check-in events: has the user scrolled the page since the last check-in?

Details

Related Gerrit Patches:
mediawiki/extensions/WikimediaEvents : masterAdd new fields to TestSearchSatisfaction
mediawiki/extensions/WikimediaEvents : wmf/1.27.0-wmf.2Add new fields to TestSearchSatisfaction
mediawiki/extensions/WikimediaEvents : wmf/1.27.0-wmf.3Add new fields to TestSearchSatisfaction
mediawiki/core : masterInclude additional analytics in Special:Search

Event Timeline

Ironholds raised the priority of this task from to High.
Ironholds updated the task description. (Show Details)
Ironholds added subscribers: Ironholds, mpopov.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 21 2015, 9:11 PM
mpopov updated the task description. (Show Details)Sep 21 2015, 9:23 PM
mpopov set Security to None.
mpopov updated the task description. (Show Details)Sep 21 2015, 9:26 PM
EBernhardson added a subscriber: EBernhardson.EditedSep 22 2015, 8:01 PM

Best guess on what needs to be done:

A per-user UUID that persists for longer than the search session - probably 24 hours.

This will have to be stored in localStorage (or a cookie. localStorage is easier and doesn't require caching considerations)

The (unhashed) search query that the user submitted. (Needed just once per SERP.)

As long as its just from the SERP this should be relatively easy. We might want to expose the query directly to javascript (rather than trying to suck it out of the correct input box) by using OutputPage:addJsConfigVars(...) in php and mw.config.get(..) on the javascript side.

The actual ID (not a pseudorandom ID) of the page that was landed on.

This is available in javascript as mw.config.get( 'wgArticleID' )

Number of results returned to the user. (Needed just once per SERP.)

Ideally we should add this via addJsConfigVars as well, but it could be counted from the page structure.

The rank of the visited page as it was on SERP.

The only way i can think of tracking this information is injecting the position into the query parameters and picking that up on page load.

For check-in events: has the user scrolled the page since the last check-in?

The most cross-browser compatible way to get this is probably to check $(window).scrollTop() for the current position to compare against the position at the last checkin.

Change 240924 had a related patch set uploaded (by EBernhardson):
Add new fields to TestSearchSatisfaction

https://gerrit.wikimedia.org/r/240924

Change 240889 had a related patch set uploaded (by EBernhardson):
Include additional analytics in Special:Search

https://gerrit.wikimedia.org/r/240889

Patch above adds all requested fields. It also goes a little bit further than requested: This adds wprov=srpw1_N to all search results, regardless of being included in the test or not. We can query this back out of the page views tables in hive and have an unsampled look
at what search positions (sorry, doesn't track which actual query the page view is related to. Would be nice but the urls would get all nasty. We would need a redirect bouncer like google at that point (which isn't that hard at all!)).

Change 240889 merged by jenkins-bot:
Include additional analytics in Special:Search

https://gerrit.wikimedia.org/r/240889

Change 240924 merged by jenkins-bot:
Add new fields to TestSearchSatisfaction

https://gerrit.wikimedia.org/r/240924

Change 246119 had a related patch set uploaded (by EBernhardson):
Add new fields to TestSearchSatisfaction

https://gerrit.wikimedia.org/r/246119

Change 246120 had a related patch set uploaded (by EBernhardson):
Add new fields to TestSearchSatisfaction

https://gerrit.wikimedia.org/r/246120

Change 246120 merged by jenkins-bot:
Add new fields to TestSearchSatisfaction

https://gerrit.wikimedia.org/r/246120

Change 246119 merged by EBernhardson:
Add new fields to TestSearchSatisfaction

https://gerrit.wikimedia.org/r/246119

Deskana closed this task as Resolved.Oct 20 2015, 2:47 PM
Deskana moved this task from Done to Resolved on the Discovery-Search (Current work) board.
Deskana added a subscriber: Deskana.