mirror of
https://github.com/wavetermdev/docusaurus-og.git
synced 2026-08-05 13:46:35 -07:00
fix: remove unnecessary fathom file
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user