Skip to content

Commit 91b6a1c

Browse files
committed
actually, let's put it into a variable
1 parent 37831c5 commit 91b6a1c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/assets/js/matomoTracking.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ const getCookie = (name) => {
44
if (parts.length === 2) return parts.pop().split(";").shift();
55
};
66

7+
const branch = import.meta.env.BRANCH || "unknown-branch";
8+
79
var _paq = (window._paq = window._paq || []);
810
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
9-
_paq.push(['setCustomDimension', 1, import.meta.env.BRANCH]); // ab-branch
11+
_paq.push(['setCustomDimension', 1, branch]); // ab-branch
1012
_paq.push(["trackPageView"]);
1113
_paq.push(["enableLinkTracking"]);
1214

0 commit comments

Comments
 (0)