diff --git a/.env b/.env index adf125a5..b80bfba4 100644 --- a/.env +++ b/.env @@ -6,4 +6,4 @@ FEEDBACK_EMAILS="" MATOMO_SRC_URL="" MATOMO_URL_BASE="" MATOMO_SITE_ID="" -MATOMO_ENABLED=false +MATOMO_ENABLED="false" diff --git a/src/App.tsx b/src/App.tsx index 9da0d6f3..4f2c326d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -104,7 +104,7 @@ const App = (): JSX.Element => { urlBase: window?.ENV?.MATOMO_URL_BASE, siteId: window?.ENV?.MATOMO_SITE_ID, srcUrl: window?.ENV?.MATOMO_SRC_URL, - enabled: window?.ENV?.MATOMO_ENABLED, + enabled: window?.ENV?.MATOMO_ENABLED === 'true', configurations: { setDoNotTrack: true, }, diff --git a/src/globals.d.ts b/src/globals.d.ts index 2d3d9483..21d5d79c 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -9,7 +9,7 @@ interface Window { MATOMO_SRC_URL: string; MATOMO_URL_BASE: string; MATOMO_SITE_ID: string; - MATOMO_ENABLED: boolean; + MATOMO_ENABLED: string; }; // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any _paq: [string, ...any[]][]; diff --git a/src/setupTests.ts b/src/setupTests.ts index b86f2847..cf265652 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -29,5 +29,5 @@ window.ENV = { MATOMO_SRC_URL: '', MATOMO_URL_BASE: 'test', MATOMO_SITE_ID: 'test123', - MATOMO_ENABLED: false, + MATOMO_ENABLED: 'false', };