Skip to content

Commit a846b2f

Browse files
DilsonsPicklesLWinterberg
authored andcommitted
Add Matomo tracking event
1 parent 904f904 commit a846b2f

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/utils/matomo.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@ export function trackEvent(category, action, name) {
44

55
// check id global variable _paq has been injected by Maotomo tracking script
66
if (typeof _paq !== "undefined") {
7-
console.log([
8-
"trackEvent",
9-
category,
10-
`${action} (branch: ${branch})`,
11-
name,
12-
]);
7+
_paq.push(["trackEvent", category, `${action} (branch: ${branch})`, name]);
138
} else {
14-
console.log("Failed");
9+
console.log("_paq undefined, could not send Matomo event")
1510
}
16-
//_paq.push(["trackEvent", category, action, name, value]);
1711
}

0 commit comments

Comments
 (0)