Skip to content

Commit

Permalink
fix(docs): return early for gtag check (fails on dev)
Browse files Browse the repository at this point in the history
  • Loading branch information
vnphanquang committed Jul 15, 2023
1 parent 94228b5 commit 1742f24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sites/docs/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
analyticsId,
});
}
$: if (browser && gtag && analyticsEnabled) {
$: if (browser && analyticsEnabled && gtag) {
gtag('config', PUBLIC_GOOGLE_ANALYTICS_MEASUREMENT_ID, {
page_title: document.title,
page_location: $page.url.href,
Expand Down Expand Up @@ -78,6 +78,7 @@
<link href={ogUrl} rel="canonical" />
<link type="text/plain" rel="author" href="{PUBLIC_ROOT_URL}/humans.txt" />

<!-- partytown scripts -->
<!-- partytown scripts -->
<!-- partytown scripts -->
<script>
Expand All @@ -90,6 +91,7 @@
{@html createPartytownSnippetScriptTag()}

{#if analyticsEnabled}
<!-- vercel analytics -->
<!-- vercel analytics -->
<!-- vercel analytics -->
<script src="/_vercel/insights/script.js" type="text/partytown"></script>
Expand Down

0 comments on commit 1742f24

Please sign in to comment.