Skip to content

Commit

Permalink
app events cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
janoside committed Nov 18, 2024
1 parent 685577b commit 7dd8df3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
}
}
Expand Down
1 change: 0 additions & 1 deletion views/admin/dashboard.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7dd8df3

Please sign in to comment.