mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 11:39:51 +01:00
Merge branch 'main' into dev
This commit is contained in:
commit
2055c00154
1 file changed
+8
-5
@@ -1,22 +1,25 @@
|
|||||||
---
|
---
|
||||||
import { assertSecret } from '@blitzkit/core';
|
import { assertSecret } from '@blitzkit/core';
|
||||||
|
|
||||||
|
const PUBLIC_GOOGLE_TAG_MANAGER_ID = assertSecret(
|
||||||
|
import.meta.env.PUBLIC_GOOGLE_TAG_MANAGER_ID,
|
||||||
|
);
|
||||||
---
|
---
|
||||||
|
|
||||||
{/* google analytics */}
|
{/* google analytics */}
|
||||||
<script
|
<script
|
||||||
is:inline
|
is:inline
|
||||||
async
|
async
|
||||||
src={`https://www.googletagmanager.com/gtag/js?id=${assertSecret(
|
src={`https://www.googletagmanager.com/gtag/js?id=${PUBLIC_GOOGLE_TAG_MANAGER_ID}`}
|
||||||
import.meta.env.PUBLIC_GOOGLE_TAG_MANAGER_ID,
|
></script>
|
||||||
)}`}></script>
|
<script is:inline define:vars={{ PUBLIC_GOOGLE_TAG_MANAGER_ID }}>
|
||||||
<script is:inline>
|
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
|
||||||
function gtag() {
|
function gtag() {
|
||||||
dataLayer.push(arguments);
|
dataLayer.push(arguments);
|
||||||
}
|
}
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
gtag('config', assertSecret(import.meta.env.PUBLIC_GOOGLE_TAG_MANAGER_ID));
|
gtag('config', PUBLIC_GOOGLE_TAG_MANAGER_ID);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{/* nitro ads */}
|
{/* nitro ads */}
|
||||||
|
|||||||
Reference in new issue
Block a user