瀏覽代碼

HUE-7226 [frontend] Log navigation usage

Johan Ahlen 8 年之前
父節點
當前提交
99c4a3f

+ 4 - 0
desktop/core/src/desktop/templates/common_header_footer_components.mako

@@ -522,6 +522,10 @@ from metadata.conf import has_optimizer, OPTIMIZER
 
   $(document).ready(function () {
 
+    if (window.performance && window.performance.navigation && window.performance.navigation.type === 1) {
+      hueAnalytics.convert('hue', 'pageReloaded' + window.location.pathname);
+    }
+
     huePubSub.subscribe('table.row.dblclick', function(data){
       var $el = $(data.table);
       var $t = $('#rowDetailsModal').find('table');

+ 3 - 0
desktop/core/src/desktop/templates/hue.mako

@@ -1141,6 +1141,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
           if (!self.assistWithoutStorage()){
             self.apiHelper.setInTotalStorage('assist', 'left_assist_panel_visible', val);
           }
+          hueAnalytics.convert('hue', 'leftAssistVisible/' + val);
           window.setTimeout(function () {
             huePubSub.publish('split.panel.resized');
           }, 0);
@@ -1151,6 +1152,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
           if (!self.assistWithoutStorage()){
             self.apiHelper.setInTotalStorage('assist', 'right_assist_panel_visible', val);
           }
+          hueAnalytics.convert('hue', 'rightAssistVisible/' + val)
           window.setTimeout(function () {
             huePubSub.publish('reposition.scroll.anchor.up');
             huePubSub.publish('nicescroll.resize');
@@ -1237,6 +1239,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
         self.leftNavVisible = ko.observable(false);
         self.leftNavVisible.subscribe(function (val) {
           huePubSub.publish('left.nav.open.toggle', val);
+          hueAnalytics.convert('hue', 'leftNavVisible/' + val);
         });
 
         self.onePageViewModel.currentApp.subscribe(function () {