diff --git a/astro.config.mjs b/astro.config.mjs
index e55d6a8..86eb769 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -2,8 +2,18 @@ import { defineConfig } from 'astro/config';
import react from "@astrojs/react";
import netlify from "@astrojs/netlify";
+import partytown from "@astrojs/partytown";
+
export default defineConfig({
- integrations: [react()],
+ integrations: [
+ react(),
+ partytown(
+ {
+ config: {
+ forward: ["dataLayer.push"],
+ },
+ }
+ )],
output: "server",
adapter: netlify()
diff --git a/package.json b/package.json
index 2d46ec9..1d71650 100644
--- a/package.json
+++ b/package.json
@@ -18,6 +18,7 @@
},
"dependencies": {
"@astrojs/netlify": "^6.0.0",
+ "@astrojs/partytown": "^2.1.2",
"@astrojs/react": "^4.1.0",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index cdeb84f..9264136 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -11,6 +11,9 @@ importers:
'@astrojs/netlify':
specifier: ^6.0.0
version: 6.0.0(astro@5.0.5(rollup@4.28.1)(typescript@5.7.2))(rollup@4.28.1)
+ '@astrojs/partytown':
+ specifier: ^2.1.2
+ version: 2.1.2
'@astrojs/react':
specifier: ^4.1.0
version: 4.1.0(@types/react-dom@19.0.2(@types/react@19.0.1))(@types/react@19.0.1)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)
@@ -69,6 +72,9 @@ packages:
peerDependencies:
astro: ^5.0.0
+ '@astrojs/partytown@2.1.2':
+ resolution: {integrity: sha512-1a9T5lqxtnrw0qLPo1KwliUvaaUzPNPtWucD8VxdwT7zqcpODFk1RzGgAgqVo+YhutFrTu/qclbtnOfXBuskjw==}
+
'@astrojs/prism@3.2.0':
resolution: {integrity: sha512-GilTHKGCW6HMq7y3BUv9Ac7GMe/MO9gi9GW62GzKtth0SwukCu/qp2wLiGpEujhY+VVhaG9v7kv/5vFzvf4NYw==}
engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0}
@@ -168,6 +174,11 @@ packages:
resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==}
engines: {node: '>=6.9.0'}
+ '@builder.io/partytown@0.10.2':
+ resolution: {integrity: sha512-A9U+4PREWcS+CCYzKGIPovtGB/PBgnH/8oQyCE6Nr9drDJk6cMPpLQIEajpGPmG9tYF7N3FkRvhXm/AS9+0iKg==}
+ engines: {node: '>=18.0.0'}
+ hasBin: true
+
'@emnapi/runtime@1.3.1':
resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==}
@@ -2083,6 +2094,11 @@ snapshots:
- tsx
- yaml
+ '@astrojs/partytown@2.1.2':
+ dependencies:
+ '@builder.io/partytown': 0.10.2
+ mrmime: 2.0.0
+
'@astrojs/prism@3.2.0':
dependencies:
prismjs: 1.29.0
@@ -2234,6 +2250,8 @@ snapshots:
'@babel/helper-string-parser': 7.25.9
'@babel/helper-validator-identifier': 7.25.9
+ '@builder.io/partytown@0.10.2': {}
+
'@emnapi/runtime@1.3.1':
dependencies:
tslib: 2.8.1
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index c15f43b..25a9df2 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -36,6 +36,17 @@ const { site, title, tagline } = Astro.props;
/>
+
+
+
+
+