Use Prettier
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
---
|
||||
const { id = "G-XXXXXXXXXX", partytown = false } = Astro.props;
|
||||
const { id = 'G-XXXXXXXXXX', partytown = false } = Astro.props;
|
||||
|
||||
const attrs = partytown ? { type: "text/partytown" } : {};
|
||||
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() {
|
||||
window.dataLayer.push(arguments);
|
||||
}
|
||||
gtag("js", new Date());
|
||||
gtag("config", id);
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() {
|
||||
window.dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
gtag('config', id);
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user