In T265243, it was investigated how to track the outcomes of the queries made by the Query Builder. It was concluded that using Hadoop would not be ideal, but that we much easier use the embedded query service results view for tracking.
This embedded query service results view has already tracking of its own in [ResultView.js](https://gerrit.wikimedia.org/r/plugins/gitiles/wikidata/query/gui/+/refs/heads/master/wikibase/queryService/ui/ResultView.js).
We want to add tracking for:
* Query Builder queries that are successful (even if they returned no matches)
* Query Builder queries that resulted in a timeout
* Query Builder queries that resulted in any other error
We can use `document.referrer` to tell referrers apart.
* [ ] track the referrers based on a list (no-referrer, query-builder, other)
* [ ] for each referrer track success results, error and timeouts
* is tracking the referrer based on an explicit list the best way to do it?
** tracking every referrer could be a privacy problem? Also it would introduce/track arbitrary data in Grafana
** tracking based on a list makes the Query Service UI aware of specific external consumers which seems to be the wrong way around