Merge pull request #157 from themesberg/fathom-analytics

feature(analytics): add privacy friendly fathom analytics
This commit is contained in:
Ilya Artamonov
2023-06-28 18:44:12 +03:00
committed by GitHub

View File

@@ -87,6 +87,29 @@ export default defineConfig({
cleanUrls: 'without-subfolders',
head: [
['link', { rel: "icon", type: "image/svg", href: "/assets/logo.svg"}],
[
"script",
{},
`
// Fathom - beautiful, simple website analytics
(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, "https://cdn.usefathom.com/tracker.js", "fathom");
fathom("set", "siteId", "MPNTKCVJ");
fathom("trackPageview");
// / Fathom
`
]
],
themeConfig: {
sidebar: buildSidebar(),