mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 02:37:05 +02:00
feat: partytown
This commit is contained in:
1 parent
0b16295853
commit
de471400ad
4 files changed
+9
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// @ts-check
|
||||
|
||||
import partytown from '@astrojs/partytown';
|
||||
import react from '@astrojs/react';
|
||||
import sitemap from '@astrojs/sitemap';
|
||||
import { SUPPORTED_LOCALES } from '@blitzkit/i18n';
|
||||
@@ -20,7 +21,7 @@ export default defineConfig({
|
||||
outDir: '../../dist/website',
|
||||
prefetch: true,
|
||||
|
||||
integrations: [react(), sitemap()],
|
||||
integrations: [react(), sitemap(), partytown()],
|
||||
vite: {
|
||||
resolve: {
|
||||
alias: {
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/partytown": "^2.1.4",
|
||||
"@blitzkit/core": "workspace:*",
|
||||
"@blitzkit/i18n": "workspace:*",
|
||||
"@nanostores/persistent": "^0.10.2",
|
||||
|
||||
@@ -10,9 +10,14 @@ const PUBLIC_GOOGLE_TAG_MANAGER_ID = assertSecret(
|
||||
<script
|
||||
is:inline
|
||||
async
|
||||
type="text/partytown"
|
||||
src={`https://www.googletagmanager.com/gtag/js?id=${PUBLIC_GOOGLE_TAG_MANAGER_ID}`}
|
||||
></script>
|
||||
<script is:inline define:vars={{ PUBLIC_GOOGLE_TAG_MANAGER_ID }}>
|
||||
<script
|
||||
is:inline
|
||||
define:vars={{ PUBLIC_GOOGLE_TAG_MANAGER_ID }}
|
||||
type="text/partytown"
|
||||
>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
|
||||
Reference in new issue
Block a user