Skip to content

Commit

Permalink
fix: remove google analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
mistakia committed May 31, 2024
1 parent 736677b commit 5da5a62
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 51 deletions.
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/**",
Expand Down Expand Up @@ -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",
Expand Down
20 changes: 2 additions & 18 deletions src/core/app/sagas.js
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down
12 changes: 0 additions & 12 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@
property="twitter:image"
content="https://nano.community/static/symbol-white.png"
data-react-helmet="true" />

<!-- Global site tag (gtag.js) - Google Analytics -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-CV3N29BMWR"></script>
<script>
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())
</script>
</head>

<body>
Expand Down
17 changes: 0 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 5da5a62

Please sign in to comment.