diff --git a/app/utils.js b/app/utils.js index bdccafa4c..0cfd0e96e 100644 --- a/app/utils.js +++ b/app/utils.js @@ -1646,11 +1646,11 @@ function trackAppEvent(name, count=1, params=null) { let props = objectProperties(params); props.forEach(prop => { - if (global.appEventStats[name].params[prop] == null) { - global.appEventStats[name].params[prop] = {count: 0}; + if (global.appEventStats[name].params[`${prop}[${params[prop]}]`] == null) { + global.appEventStats[name].params[`${prop}[${params[prop]}]`] = {count: 0}; } - global.appEventStats[name].params[prop].count += count; + global.appEventStats[name].params[`${prop}[${params[prop]}]`].count += count; }); } } diff --git a/views/admin/dashboard.pug b/views/admin/dashboard.pug index 5d0431a41..584d5e667 100644 --- a/views/admin/dashboard.pug +++ b/views/admin/dashboard.pug @@ -33,7 +33,6 @@ block content code.json #{JSON.stringify(appConfig, null, 4)} if (JSON.stringify(appEventStats) != "{}") - pre #{JSON.stringify(appEventStats)} +contentSection("App Events") .table-responsive table.table.table-borderless.table-hover.table-striped