Fix minimal details

This commit is contained in:
prototypa
2022-09-04 00:56:24 -04:00
parent 570cf904c4
commit 1cf25d6b43
44 changed files with 757 additions and 641 deletions

View File

@ -0,0 +1,16 @@
---
const { id = "G-XXXXXXXXXX", partytown = false } = Astro.props;
const attrs = partytown ? { type: "text/partytown" } : {};
---
<script is:inline async src={`https://www.googletagmanager.com/gtag/js?id=${id}`} {...attrs}></script>
<script is:inline define:vars={{ id }} {...attrs}>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", id);
</script>