Addshore has uploaded a new change for review.

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

Change subject: Track firstQuery count
......................................................................

Track firstQuery count

This will allow us ot see how many loads actually result
in someone running a query.

Change-Id: Ic5a6a7b9a2487219e3a845c740d0027802ef8aaf
---
M wikibase/queryService/ui/App.js
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/76/309276/1

diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 441979e..327f247 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -93,6 +93,12 @@
        SELF.prototype._trackingApi = null;
 
        /**
+        * @property {boolean}
+        * @private
+        */
+       SELF.prototype._hasRunFirstQuery = false;
+
+       /**
         * @property {Object}
         * @private
         */
@@ -581,6 +587,11 @@
        SELF.prototype._handleQuerySubmit = function( e ) {
                var self = this;
 
+               if( !this._hasRunFirstQuery ) {
+                       this._track( 'firstQuery' );
+                       this._hasRunFirstQuery = true;
+               }
+
                e.preventDefault();
                this._editor.save();
                this._updateQueryUrl();

-- 
To view, visit https://gerrit.wikimedia.org/r/309276
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5a6a7b9a2487219e3a845c740d0027802ef8aaf
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Addshore <addshorew...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to