Merge "Report when user switch tab from gerrit"

This commit is contained in:
Milutin Kristofic
2020-01-29 19:22:49 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 2 deletions

View File

@@ -158,6 +158,12 @@
}
}
document.addEventListener('visibilitychange', () => {
const eventName = `Visibility changed to ${document.visibilityState}`;
GrReporting.prototype.reporter(INTERACTION_TYPE, undefined, eventName,
undefined, {}, true);
});
// The Polymer pass of JSCompiler requires this to be reassignable
// eslint-disable-next-line prefer-const
let GrReporting = Polymer({
@@ -389,7 +395,8 @@
pluginsLoaded(pluginsList) {
this.timeEnd(TIMER.PLUGINS_LOADED);
this.reporter(
PLUGINS.TYPE, PLUGINS.INSTALLED, (pluginsList || []).join(','));
PLUGINS.TYPE, PLUGINS.INSTALLED, PLUGINS.INSTALLED, undefined,
{pluginsList: pluginsList || []}, true);
},
/**

View File

@@ -308,7 +308,7 @@ limitations under the License.
{
type: 'lifecycle',
category: 'Plugins installed',
name: 'foo,bar',
eventDetails: JSON.stringify({pluginsList: ['foo', 'bar']}),
}
));
});