From b4991a05941f6f097872d688e9cea13441615152 Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 28 Nov 2023 15:38:15 +0100 Subject: [PATCH 1/2] disable cookie setting matomo --- apps/remix-ide/src/assets/js/loader.js | 1 - .../remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx | 2 -- libs/remix-ui/settings/src/lib/settingsAction.ts | 2 -- 3 files changed, 5 deletions(-) diff --git a/apps/remix-ide/src/assets/js/loader.js b/apps/remix-ide/src/assets/js/loader.js index 8db5546da5e..894b38a5d77 100644 --- a/apps/remix-ide/src/assets/js/loader.js +++ b/apps/remix-ide/src/assets/js/loader.js @@ -17,7 +17,6 @@ if (domains[window.location.hostname]) { /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["setExcludedQueryParams", ["code","gist"]]); _paq.push(["setExcludedReferrers", ["etherscan.io"]]); - _paq.push(['disableCookies']); _paq.push(['enableJSErrorTracking']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx index 86777b5a6cc..2e0c25d9347 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx @@ -67,8 +67,6 @@ const MatomoDialog = (props) => { const handleModalOkClick = async () => { _paq.push(['forgetUserOptOut']) - // @TODO remove next line when https://github.com/matomo-org/matomo/commit/9e10a150585522ca30ecdd275007a882a70c6df5 is used - document.cookie = 'mtm_consent_removed=; expires=Thu, 01 Jan 1970 00:00:01 GMT;' settings.updateMatomoAnalyticsChoice(true) appManager.call('walkthrough', 'start') setVisible(false) diff --git a/libs/remix-ui/settings/src/lib/settingsAction.ts b/libs/remix-ui/settings/src/lib/settingsAction.ts index 36ec1cbf0bc..cc5b096ee08 100644 --- a/libs/remix-ui/settings/src/lib/settingsAction.ts +++ b/libs/remix-ui/settings/src/lib/settingsAction.ts @@ -44,8 +44,6 @@ export const useMatomoAnalytics = (config, checked, dispatch) => { dispatch({ type: 'useMatomoAnalytics', payload: { isChecked: checked, textClass: checked ? textDark : textSecondary } }) if (checked) { _paq.push(['forgetUserOptOut']) - // @TODO remove next line when https://github.com/matomo-org/matomo/commit/9e10a150585522ca30ecdd275007a882a70c6df5 is used - document.cookie = 'mtm_consent_removed=; expires=Thu, 01 Jan 1970 00:00:01 GMT;' } else { _paq.push(['optUserOut']) } From fb61693f231cdceab578e38d1e5b9ec6bce627af Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 29 Nov 2023 12:35:00 +0100 Subject: [PATCH 2/2] reenable disableCookies --- apps/remix-ide/src/assets/js/loader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/remix-ide/src/assets/js/loader.js b/apps/remix-ide/src/assets/js/loader.js index 894b38a5d77..8db5546da5e 100644 --- a/apps/remix-ide/src/assets/js/loader.js +++ b/apps/remix-ide/src/assets/js/loader.js @@ -17,6 +17,7 @@ if (domains[window.location.hostname]) { /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["setExcludedQueryParams", ["code","gist"]]); _paq.push(["setExcludedReferrers", ["etherscan.io"]]); + _paq.push(['disableCookies']); _paq.push(['enableJSErrorTracking']); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']);