Skip to content

Commit

Permalink
Fix misconfigured gtag script
Browse files Browse the repository at this point in the history
  • Loading branch information
gomander committed Feb 25, 2024
1 parent 7572052 commit 9433faa
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,16 @@
async
src="https://www.googletagmanager.com/gtag/js?id={PUBLIC_FIREBASE_MEASUREMENT_ID}"
/>
<script>
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', PUBLIC_FIREBASE_MEASUREMENT_ID)
</script>
{@html `
<script>
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', ${PUBLIC_FIREBASE_MEASUREMENT_ID})
</script>
`}
{/if}
</svelte:head>
Expand Down

0 comments on commit 9433faa

Please sign in to comment.