Skip to content

Commit 97272d5

Browse files
committed
fix(GA): attempt to fix broken GA integration
also update partytown
1 parent f129889 commit 97272d5

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

package-lock.json

Lines changed: 21 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"devDependencies": {
2323
"@astrojs/mdx": "^0.19.0",
24-
"@astrojs/partytown": "^1.2.1",
24+
"@astrojs/partytown": "^2.1.2",
2525
"@astrojs/svelte": "^2.0.1",
2626
"@github/clipboard-copy-element": "^1.1.2",
2727
"@iconify-json/bi": "^1.1.15",

src/components/app/GATag.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33

44
<>
55
<!-- Google tag (gtag.js) -->
6-
<script async type="text/partytown" src="https://www.googletagmanager.com/gtag/js?id=G-2PFC5181P7"
6+
<script type="text/partytown" src="https://www.googletagmanager.com/gtag/js?id=G-2PFC5181P7"
77
></script>
88
<script type="text/partytown">
99
window.dataLayer = window.dataLayer || [];
1010
function gtag() {
1111
dataLayer.push(arguments);
1212
}
1313

14+
// to filter out non-production or non-official deployment views
1415
if (window.location.hostname === 'bizarre-binary.github.io') {
1516
gtag('js', new Date());
1617
gtag('config', 'G-2PFC5181P7');

0 commit comments

Comments
 (0)