feat(doc): add google analytics

This commit is contained in:
thomas
2023-09-26 13:12:44 +02:00
parent 1acb4708cf
commit 975ea1af57

View File

@@ -34,6 +34,25 @@ export default defineConfig({
autogenerate: { directory: 'challenges' },
},
],
head: [
{
tag: 'script',
attrs: {
src: 'https://www.googletagmanager.com/gtag/js?id=G-6BXJ62W6G5',
async: true,
},
},
{
tag: 'script',
content: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-6BXJ62W6G5');
`,
},
],
}),
],
});