Skip to content

Commit

Permalink
Merge pull request #95 from vnbl/claraberendsen/fix-google-analytics
Browse files Browse the repository at this point in the history
Remove partytown since it doesn't play well with ga
  • Loading branch information
claraberendsen authored Dec 11, 2024
2 parents 8558bb2 + a26eb5d commit 98030b2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 27 deletions.
7 changes: 1 addition & 6 deletions frontend/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import svgr from "vite-plugin-svgr"
import node from "@astrojs/node";
import react from '@astrojs/react';
import formDebug from "@astro-utils/forms/dist/integration.js";
import partytown from '@astrojs/partytown'
import sitemap from '@astrojs/sitemap';

import { loadEnv } from "vite";
Expand Down Expand Up @@ -40,11 +39,7 @@ export default defineConfig({
output: "hybrid",
trailingSlash: "ignore",
srcDir: "./src",
integrations: [formDebug, react(), tailwind(), lottie(), partytown({
config: {
forward: ["dataLayer.push"],
},
}),
integrations: [formDebug, react(), tailwind(), lottie(),
sitemap()
],
adapter: node({
Expand Down
1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@astro-utils/forms": "^3.13.18",
"@astrojs/check": "^0.9.4",
"@astrojs/node": "^8.3.4",
"@astrojs/partytown": "^2.1.2",
"@astrojs/react": "^3.6.2",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "^5.1.2",
Expand Down
18 changes: 0 additions & 18 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions frontend/src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const GTAG=import.meta.env.PUBLIC_GTAG
<html lang="en" class="md:overflow-hidden">
<head>
<!-- Google tag (gtag.js) -->
<script type="text/partytown" async src=`https://www.googletagmanager.com/gtag/js?id=${GTAG}`
<script async src=`https://www.googletagmanager.com/gtag/js?id=${GTAG}`
></script>
<script type="text/partytown" define:vars={{GTAG}}>
<script define:vars={{GTAG}}>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
Expand Down

0 comments on commit 98030b2

Please sign in to comment.