Remove Fathom analytics

This commit is contained in:
Max Wofford 2021-03-22 15:13:31 -04:00
parent 232dfae448
commit ae33ac3a2b
3 changed files with 7 additions and 32 deletions

View file

@ -17,7 +17,6 @@
"@mdx-js/loader": "^1.6.22",
"@next/mdx": "^10.0.4",
"airtable-plus": "^1.0.4",
"fathom-client": "^3.0.0",
"globby": "^11.0.2",
"lodash": "^4.17.21",
"next": "^10.0.9",

View file

@ -1,35 +1,16 @@
import React, { useEffect } from 'react'
import { useRouter } from 'next/router'
import NextApp from 'next/app'
import React from 'react'
import Head from 'next/head'
import Meta from '@hackclub/meta'
import '@hackclub/theme/fonts/reg-bold.css'
import theme from '../lib/theme'
import { ThemeProvider } from 'theme-ui'
import * as Fathom from 'fathom-client'
const App = ({ Component, pageProps }) => {
const router = useRouter()
useEffect(() => {
Fathom.load('OGIMJEFA', {
includedDomains: ['hackclub.com', 'v3.hackclub.com'],
url: 'https://aardvark.hackclub.com/script.js'
})
const onRouteChangeComplete = () => Fathom.trackPageview()
router.events.on('routeChangeComplete', onRouteChangeComplete)
return () => {
router.events.off('routeChangeComplete', onRouteChangeComplete)
}
}, [])
return (
<ThemeProvider theme={theme}>
<Meta as={Head} />
<Component {...pageProps} />
</ThemeProvider>
)
}
const App = ({ Component, pageProps }) => (
<ThemeProvider theme={theme}>
<Meta as={Head} />
<Component {...pageProps} />
</ThemeProvider>
)
export default App

View file

@ -1487,11 +1487,6 @@ fastq@^1.6.0:
dependencies:
reusify "^1.0.4"
fathom-client@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/fathom-client/-/fathom-client-3.0.0.tgz#409c047cf1e2fea45b148e28d50fcd635e992893"
integrity sha512-d0oH2SHWCMIVLbbegB7nBIjSvbqbHrZBZxIOWSVAxlJL/roL0Ah9NNb6rTIcKMlA4gov9AjWQGEcZRzlnGc3XQ==
fill-range@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"