feat: add fathom analytics

This commit is contained in:
jinhojang6 2023-10-05 23:00:27 +09:00 committed by Jinho Jang
parent 0e141c6f91
commit 3ec59c7a64
1 changed files with 15 additions and 0 deletions

View File

@ -10,6 +10,21 @@ export default function Document() {
__html: `var main=function(){try{var t=JSON.parse(localStorage.getItem("theme")||"{}"),e=(null==t?void 0:t.mode)||${defaultThemeState.mode},a=(null==t?void 0:t.genericFontFamily)||${defaultThemeState.genericFontFamily},i=document.querySelector("html");i.setAttribute("data-theme",e),i.setAttribute("data-font-family",a)}catch(n){}};main();`,
}}
/>
<script
dangerouslySetInnerHTML={{
__html: `(function(f, a, t, h, o, m){
a[h]=a[h]||function(){
(a[h].q=a[h].q||[]).push(arguments)
};
o=f.createElement('script'),
m=f.getElementsByTagName('script')[0];
o.async=1; o.src=t; o.id='fathom-script';
m.parentNode.insertBefore(o,m)
})(document, window, '//fathom.status.im/tracker.js', 'fathom');
fathom('set', 'siteId', 'VERNO');
fathom('trackPageview');`,
}}
/>
</Head>
<body>