2025-06-26 10:36:51 -05:00
|
|
|
---
|
|
|
|
|
import { assertSecret } from '@blitzkit/core';
|
|
|
|
|
|
|
|
|
|
const PUBLIC_GOOGLE_TAG_MANAGER_ID = assertSecret(
|
|
|
|
|
import.meta.env.PUBLIC_GOOGLE_TAG_MANAGER_ID,
|
|
|
|
|
);
|
|
|
|
|
---
|
|
|
|
|
|
2024-10-09 10:29:42 -05:00
|
|
|
<script
|
|
|
|
|
is:inline
|
|
|
|
|
async
|
2025-06-26 10:36:51 -05:00
|
|
|
src={`https://www.googletagmanager.com/gtag/js?id=${PUBLIC_GOOGLE_TAG_MANAGER_ID}`}
|
2024-12-16 10:59:26 -06:00
|
|
|
></script>
|
2025-06-26 10:36:51 -05:00
|
|
|
|
|
|
|
|
<script is:inline define:vars={{ PUBLIC_GOOGLE_TAG_MANAGER_ID }}>
|
2024-09-14 19:43:14 -05:00
|
|
|
window.dataLayer = window.dataLayer || [];
|
|
|
|
|
|
|
|
|
|
function gtag() {
|
|
|
|
|
dataLayer.push(arguments);
|
|
|
|
|
}
|
2025-06-26 10:36:51 -05:00
|
|
|
|
2024-09-14 19:43:14 -05:00
|
|
|
gtag('js', new Date());
|
2025-06-26 10:36:51 -05:00
|
|
|
|
|
|
|
|
gtag('config', PUBLIC_GOOGLE_TAG_MANAGER_ID);
|
2024-09-14 19:43:14 -05:00
|
|
|
</script>
|