Add additional tracking information to mediawiki.searchSuggest
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 15 Feb 2016 20:49:37 +0000 (12:49 -0800)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Fri, 4 Mar 2016 19:53:39 +0000 (11:53 -0800)
commitc1159337a96dca6251d9d2095cc3b53925a5d4e5
treefbffbafead4f092a41ca5e5a8b9a458cd241ab49
parent95b2be3bd3d95c5d0598e664a797cad8f216ba37
Add additional tracking information to mediawiki.searchSuggest

Adds a few pieces of information to improve tracking of autocomplete
usage.

* When using Special:Search 'go' feature forward wprov parameter to redirect
* Include a data attribute indicating autocomplete location to
  differentiate usage of the header and Special:Search content autocompletes
* Report exact query string that was used for impression-results
* Add handling to allow searchSuggest subscribers to append tracking
  information to generated article links
* Add a new hook, SpecialSearchGoResult, that can either change the url
  redirected to in the 'go' feature or cancel it entirely.

Bug: T125915
Change-Id: Iec7171fcf301f1659d852afa87ce271f468177c1
docs/hooks.txt
includes/specials/SpecialSearch.php
resources/src/jquery/jquery.suggestions.js
resources/src/mediawiki/mediawiki.searchSuggest.js