From 3fbc273110f5d7f72966ee8e8abc2dc1296eec71 Mon Sep 17 00:00:00 2001 From: Marcus Eagan Date: Thu, 7 Nov 2024 13:13:37 -0800 Subject: [PATCH] Update Partytown (#1467) Add partytown config to be able to push analytics into the data layer --- web/platform/astro.config.ts | 6 +++++- web/platform/src/thirdParty/GoogleTagManager.astro | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/web/platform/astro.config.ts b/web/platform/astro.config.ts index 6801715ac..7ed7a5297 100644 --- a/web/platform/astro.config.ts +++ b/web/platform/astro.config.ts @@ -41,7 +41,11 @@ export default defineConfig({ }), starlight(starlightConfig), sitemap(), - partytown(), + partytown({ + config: { + forward: ["dataLayer.push"], + }, + }), ], markdown: { rehypePlugins: [ diff --git a/web/platform/src/thirdParty/GoogleTagManager.astro b/web/platform/src/thirdParty/GoogleTagManager.astro index eae8660d2..281962076 100644 --- a/web/platform/src/thirdParty/GoogleTagManager.astro +++ b/web/platform/src/thirdParty/GoogleTagManager.astro @@ -7,3 +7,10 @@ const measurementId = props.measurementId type='text/partytown' src={`https://www.googletagmanager.com/gtag/js?id=${measurementId}`}> +