fix: remove unnecessary fathom file

This commit is contained in:
jinhojang6
2023-06-28 09:33:48 +09:00
parent 0d03f51790
commit 02b3cad4fd
2 changed files with 1 additions and 36 deletions
@@ -54,8 +54,6 @@ const config = {
],
],
// clientModules: ['./src/fathom.ts'],
plugins: [
[
'@docusaurus/plugin-content-blog',
@@ -75,7 +73,7 @@ const config = {
'@acid-info/docusaurus-fathom',
{
siteId: 'FUTMI',
scriptUrl: '//fathom.status.im/tracker.js',
scriptUrl: 'https://fathom.status.im/tracker.js',
},
],
],
@@ -1,33 +0,0 @@
const SCRIPT_URL = '//fathom.status.im/tracker.js'
const SITE_ID = 'FUTMI'
declare global {
interface Window {
fathom: any
}
}
;(function (f: any, a: Window, t: string, h: string) {
a[h] =
a[h] ||
function () {
;(a[h].q = a[h].q || []).push(arguments)
}
const o = f.createElement('script')
const m = f.getElementsByTagName('script')[0]
o.async = 1
o.src = t
o.id = 'fathom-script'
m.parentNode.insertBefore(o, m)
})(document, window, SCRIPT_URL, 'fathom')
const { fathom } = window as any
fathom('set', 'siteId', SITE_ID)
fathom('trackPageview')
export function onRouteDidUpdate({ location, previousLocation }) {
console.log('vvxcvxcv')
if (location.pathname !== previousLocation?.pathname) {
fathom('trackPageview')
}
}