From 5da5a62bc37f6dea3b8ff1241dc2d2b216f446b6 Mon Sep 17 00:00:00 2001 From: mistakia <1823355+mistakia@users.noreply.github.com> Date: Thu, 30 May 2024 21:06:31 -0400 Subject: [PATCH] fix: remove google analytics --- package.json | 5 +---- src/core/app/sagas.js | 20 ++------------------ src/index.html | 12 ------------ yarn.lock | 17 ----------------- 4 files changed, 3 insertions(+), 51 deletions(-) diff --git a/package.json b/package.json index 594f7a17..4c9116e8 100644 --- a/package.json +++ b/package.json @@ -68,9 +68,7 @@ "excludedThirdPartyRequests": [ "https://fonts.googleapis.com", "https://fonts.gstatic.com", - "https://api.github.com", - "https://www.google-analytics.com", - "https://www.googletagmanager.com" + "https://api.github.com" ], "exclude": [ "/static/**", @@ -139,7 +137,6 @@ "@babel/register": "^7.23.7", "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", - "@fingerprintjs/fingerprintjs": "^3.4.2", "@mui/icons-material": "^5.15.16", "@mui/material": "^5.15.16", "@mui/styles": "^5.15.16", diff --git a/src/core/app/sagas.js b/src/core/app/sagas.js index 71956b22..74aa6066 100644 --- a/src/core/app/sagas.js +++ b/src/core/app/sagas.js @@ -1,29 +1,13 @@ -/* global gtag */ import { takeLatest, fork, select } from 'redux-saga/effects' import { LOCATION_CHANGE } from 'connected-react-router' -import FingerprintJS from '@fingerprintjs/fingerprintjs' import history from '@core/history' import { getApp } from './selectors' import { appActions } from './actions' -const fpPromise = FingerprintJS.load() - -// cookie-less / anonymous GA reporting async function pageView() { - if (!window.gtag) { - return - } - - const fp = await fpPromise - const result = await fp.get() - - gtag('config', 'G-CV3N29BMWR', { - page_path: history.location.pathname, - client_storage: 'none', - anonymize_ip: true, - client_id: result.visitorId - }) + console.log(`pageView: ${history.location.pathname}`) + // TODO } export function* init() { diff --git a/src/index.html b/src/index.html index 45275721..65dd9954 100644 --- a/src/index.html +++ b/src/index.html @@ -34,18 +34,6 @@ property="twitter:image" content="https://nano.community/static/symbol-white.png" data-react-helmet="true" /> - - - - diff --git a/yarn.lock b/yarn.lock index 4208568c..63c8a5b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2950,15 +2950,6 @@ __metadata: languageName: node linkType: hard -"@fingerprintjs/fingerprintjs@npm:^3.4.2": - version: 3.4.2 - resolution: "@fingerprintjs/fingerprintjs@npm:3.4.2" - dependencies: - tslib: ^2.4.1 - checksum: 3b9dc81e4186f1aaa39e208c17939f5747bf9a8eb1c8175264a352e46e263abd81bcf89439240bd1a4755d7e3dfb4a83164e294f940abc290e7f2076d3b603ce - languageName: node - linkType: hard - "@floating-ui/core@npm:^1.0.0": version: 1.6.0 resolution: "@floating-ui/core@npm:1.6.0" @@ -17039,7 +17030,6 @@ __metadata: "@babel/register": ^7.23.7 "@emotion/react": ^11.11.4 "@emotion/styled": ^11.11.5 - "@fingerprintjs/fingerprintjs": ^3.4.2 "@mui/icons-material": ^5.15.16 "@mui/material": ^5.15.16 "@mui/styles": ^5.15.16 @@ -18836,13 +18826,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.4.1": - version: 2.6.0 - resolution: "tslib@npm:2.6.0" - checksum: c01066038f950016a18106ddeca4649b4d76caa76ec5a31e2a26e10586a59fceb4ee45e96719bf6c715648e7c14085a81fee5c62f7e9ebee68e77a5396e5538f - languageName: node - linkType: hard - "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0"