From 5cf6f7aa7fa89179f9e143c5f368dc8f90c32138 Mon Sep 17 00:00:00 2001 From: Ramiro Saenz Date: Tue, 12 Jul 2016 17:32:46 -0300 Subject: [PATCH] Keep user active for Google Analytics Keep user active if switch tabs --- app/view/main/MainController.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/view/main/MainController.js b/app/view/main/MainController.js index 17914098..3ae7afb5 100644 --- a/app/view/main/MainController.js +++ b/app/view/main/MainController.js @@ -8,6 +8,9 @@ Ext.define('Rambox.view.main.MainController', { var me = this; var webview = newTab.down('component').el.dom; + // Set Google Analytics event + ga_storage._trackPageview('/index.html', 'main'); + if ( webview ) webview.focus(); }