Add click metrics for cherry picking topics

Change-Id: I211be7c09ebb571cd9bfcac52e582f2f5b47302e
This commit is contained in:
Dhruv Srivastava
2020-04-16 12:31:54 +02:00
parent 00df88075c
commit c6fe0b1733
2 changed files with 3 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import '../../../behaviors/fire-behavior/fire-behavior.js';
import '../../../styles/shared-styles.js';
import '../../shared/gr-autocomplete/gr-autocomplete.js';
import '../../shared/gr-dialog/gr-dialog.js';
import '../../core/gr-reporting/gr-reporting.js';
import '../../shared/gr-rest-api-interface/gr-rest-api-interface.js';
import {GestureEventListeners} from '@polymer/polymer/lib/mixins/gesture-event-listeners.js';
import {LegacyElementMixin} from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
@@ -259,6 +260,7 @@ class GrConfirmCherrypickDialog extends GestureEventListeners(
e.preventDefault();
e.stopPropagation();
if (this._cherryPickType === CHERRY_PICK_TYPES.TOPIC) {
this.$.reporting.reportInteraction('cherry-pick-topic-clicked');
this._handleCherryPickTopic();
return;
}

View File

@@ -153,5 +153,6 @@ export const htmlTemplate = html`
</template>
</div>
</gr-dialog>
<gr-reporting id="reporting" category="confirm-cherry-pick-dialog"></gr-reporting>
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;