1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-18 19:43:16 +00:00

GA support

This commit is contained in:
2025-07-06 08:56:20 +02:00
parent 384a1e9ccc
commit 4f28dabc0b
4 changed files with 47 additions and 11 deletions
-11
View File
@@ -32,17 +32,6 @@
s.crossOrigin = 'anonymous';
document.head.appendChild(s);
}
if (window.env && window.env.VITE_GA_ID) {
const g = document.createElement('script');
g.async = true;
g.src =
'https://www.googletagmanager.com/gtag/js?id=' + window.env.VITE_GA_ID;
document.head.appendChild(g);
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', window.env.VITE_GA_ID);
}
</script>
</head>
<body>