mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02: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';
|
||||
|
||||
const PUBLIC_GOOGLE_TAG_MANAGER_ID = assertSecret(
|
||||
import.meta.env.PUBLIC_GOOGLE_TAG_MANAGER_ID,
|
||||
);
|
||||
---
|
||||
|
||||
{/* google analytics */}
|
||||
<script
|
||||
is:inline
|
||||
async
|
||||
src={`https://www.googletagmanager.com/gtag/js?id=${assertSecret(
|
||||
import.meta.env.PUBLIC_GOOGLE_TAG_MANAGER_ID,
|
||||
)}`}></script>
|
||||
<script is:inline>
|
||||
src={`https://www.googletagmanager.com/gtag/js?id=${PUBLIC_GOOGLE_TAG_MANAGER_ID}`}
|
||||
></script>
|
||||
<script is:inline define:vars={{ PUBLIC_GOOGLE_TAG_MANAGER_ID }}>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
gtag('config', assertSecret(import.meta.env.PUBLIC_GOOGLE_TAG_MANAGER_ID));
|
||||
gtag('config', PUBLIC_GOOGLE_TAG_MANAGER_ID);
|
||||
</script>
|
||||
|
||||
{/* nitro ads */}
|
||||
|
||||
Reference in new issue
Block a user