Page MenuHomePhabricator

Track errors in the UI of commons-query.wikimedia.org
Open, Needs TriagePublic

Description

The UI used for the wiki commons query service currently collects no metrics, even though the UI has metric tracking built in.

This looks to be due to the following function which throws out any attempt to track on commons query:

SELF.prototype.track = function( metricName, value, valueType ) {
    if ( !value ) {
        value = 1;
    }
    if ( !valueType ) {
        valueType = 'c';
    }

    if (
        location.hostname !== 'query.wikidata.org' ||
        /^1|yes/.test( navigator.doNotTrack || window.doNotTrack )
    ) {
        // skip tracking
        return $.when();
    }

    // https://www.wikidata.org/beacon/statsv?test.statsv.foo2=5c
    return this._track( metricName + '=' + value + valueType );
};

AC: Metrics are collected from the UI for commons-query.wikimedia.org