feat: add google tag manager script

I LOVE MORE TELEMETRY
This commit is contained in:
afn 2023-06-06 00:03:59 -04:00
parent 8458e95927
commit b8c6e4bf95
2 changed files with 15 additions and 2 deletions

View File

@ -10,6 +10,7 @@
<body>
<div>%sveltekit.body%</div>
</body>
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MQ6K849" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
</html>

View File

@ -67,6 +67,18 @@
gtag('js', new Date());
gtag('config', 'G-PLH0N9VQL5');
</script>
<script>
(function (w, d, s, l, i) {
w[l] = w[l] || [];
w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
var f = d.getElementsByTagName(s)[0],
j = d.createElement(s),
dl = l != 'dataLayer' ? '&l=' + l : '';
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, 'script', 'dataLayer', 'GTM-MQ6K849');
</script>
</svelte:head>
<QueryClientProvider client={queryClient}>