As a search analyst I want to know which web requests are the result of an autocomplete clickthrough
Every backend search request performed by CirrusSearch generates an associated log and a unique searchToken that represents that individual search. For API requests, including action=opensearch, list=search, and generator=search, this is included in the response as the HTTP header x-search-id.
Within fulltext search a script, ext.cirrus.serp.js in the CirrusSearch extension, watches for clickthroughs to full text search results and adjusts the current pages location via History.replaceState to include &searchToken=<value> immediatly prior to processing the click through such that the browsers referer header on the resulting click will include the token for later web request log processing.
The task is to create the same functionality, with the searchToken included in the referer header of clickthroughs, within mobile web autocomplete.
AC: Analysts can connect clickthroughs to backend search request logging via searchToken inclusion in the referrer header
- Go to the mobile site
- Open the network tab and make sure you are preserving network requests.
- Perform a search (doesn't matter if you are logged in)
- Clear any existing network requests
- Click a search result
- Look at the request for the HTML asset for the search result and inspect the HTTP headers for that request.
- Expected: The referrer URL should contain a searchToken parameter identifying the page you began the search.
QA Results - Beta
QA Results - Prod