From 0ba117e603ae184f8985891d137f76c78768c408 Mon Sep 17 00:00:00 2001 From: Michelle Meinert Date: Wed, 20 Sep 2023 17:48:35 +0200 Subject: [PATCH 1/2] feat: gtag --- src/components/gtag.svelte | 18 ++++++++++++++++++ src/routes/+layout.svelte | 2 ++ 2 files changed, 20 insertions(+) create mode 100644 src/components/gtag.svelte diff --git a/src/components/gtag.svelte b/src/components/gtag.svelte new file mode 100644 index 00000000..3b282792 --- /dev/null +++ b/src/components/gtag.svelte @@ -0,0 +1,18 @@ + + + + {#if !dev && $page.data.version === 'published' && $page.url.host === 'significa.co'} + + + {/if} + diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b7184d0d..e24fdf67 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -10,6 +10,7 @@ import Footer from '$components/footer.svelte'; import { toast, Toaster, ToastNotification } from '@significa/svelte-ui'; import { beforeNavigate } from '$app/navigation'; + import Gtag from '$components/gtag.svelte'; export let data; beforeNavigate(() => { @@ -20,6 +21,7 @@ + Date: Wed, 20 Sep 2023 17:54:08 +0200 Subject: [PATCH 2/2] feat: service snippet --- src/components/gtag.svelte | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/gtag.svelte b/src/components/gtag.svelte index 3b282792..a3267e67 100644 --- a/src/components/gtag.svelte +++ b/src/components/gtag.svelte @@ -14,5 +14,10 @@ gtag('js', new Date()); gtag('config', 'AW-11144833772'); + {#if $page.url.pathname === '/services'} + + {/if} {/if}