diff --git a/packages/docusaurus-playground/docusaurus.config.js b/packages/docusaurus-playground/docusaurus.config.js index bd7ff53..b164d10 100644 --- a/packages/docusaurus-playground/docusaurus.config.js +++ b/packages/docusaurus-playground/docusaurus.config.js @@ -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', }, ], ], diff --git a/packages/docusaurus-playground/src/fathom.ts b/packages/docusaurus-playground/src/fathom.ts deleted file mode 100644 index c45a4b0..0000000 --- a/packages/docusaurus-playground/src/fathom.ts +++ /dev/null @@ -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') - } -}