From bc4bdaed64ce82796fbd40f0b60d21659ea76437 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Fri, 3 Jan 2025 11:25:33 -0800 Subject: [PATCH] add comments --- src/ui-client/src/utils/envConfig.ts | 1 + src/ui-client/src/utils/piwik.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ui-client/src/utils/envConfig.ts b/src/ui-client/src/utils/envConfig.ts index cc5329ef..c9875304 100644 --- a/src/ui-client/src/utils/envConfig.ts +++ b/src/ui-client/src/utils/envConfig.ts @@ -21,6 +21,7 @@ export async function fetchEnvData(): Promise { if (results[1].value) { returnResults = { ...returnResults, + // user auth/context info will be under the `user` key user: results[1].value } } diff --git a/src/ui-client/src/utils/piwik.ts b/src/ui-client/src/utils/piwik.ts index 80034860..06b9375c 100644 --- a/src/ui-client/src/utils/piwik.ts +++ b/src/ui-client/src/utils/piwik.ts @@ -34,6 +34,7 @@ export async function addMatomoTracking() { // no site Id return if (!siteId) return; // init global piwik tracking object + // note this will only be executed if BOTH userId and siteId are present window._paq = []; window._paq.push(["trackPageView"]); window._paq.push(["enableLinkTracking"]);