diff --git a/frontend/templates/troubleshooting/components/TagManager.tsx b/frontend/templates/troubleshooting/components/TagManager.tsx index fc4bf4a7..6178541b 100644 --- a/frontend/templates/troubleshooting/components/TagManager.tsx +++ b/frontend/templates/troubleshooting/components/TagManager.tsx @@ -35,25 +35,24 @@ function GoogleNoScript() { } function MatomoScript() { - console.log('matomo script'); const params = new URLSearchParams(); const environment = params.get(GET_PARAM) || DEFAULT_ENV; const configUrl = (function () { switch (environment) { case 'Live': - return process.env.MATOMO_TAG_MANAGER_CONTAINER_URL_LIVE; + return process.env + .NEXT_PUBLIC_MATOMO_TAG_MANAGER_CONTAINER_URL_LIVE; case 'Staging': - return process.env.MATOMO_TAG_MANAGER_CONTAINER_URL_STAGING; + return process.env + .NEXT_PUBLIC_MATOMO_TAG_MANAGER_CONTAINER_URL_STAGING; case 'Dev': - return process.env.MATOMO_TAG_MANAGER_CONTAINER_URL_DEV; + return process.env.NEXT_PUBLIC_MATOMO_TAG_MANAGER_CONTAINER_URL_DEV; default: throw new Error(`Unknown environment: ${environment}`); } })(); - console.log(`Matomo script: ${configUrl}`); - const scriptTag = ` var c = "${configUrl}"; diff --git a/frontend/templates/troubleshooting/index.tsx b/frontend/templates/troubleshooting/index.tsx index 66e90d65..ef380144 100644 --- a/frontend/templates/troubleshooting/index.tsx +++ b/frontend/templates/troubleshooting/index.tsx @@ -81,7 +81,8 @@ const Wiki: NextPageWithLayout<{ ); console.log( - 'matomo live url: ' + process.env.MATOMO_TAG_MANAGER_CONTAINER_URL_LIVE + 'matomo live url: ' + + process.env.NEXT_PUBLIC_MATOMO_TAG_MANAGER_CONTAINER_URL_LIVE ); return (