Try to fix GA

This commit is contained in:
Kalle
2022-12-10 23:54:10 +02:00
parent fbc5979fb8
commit 9cd190df53

View File

@@ -240,8 +240,6 @@ function GTM({ id }: { id: string }) {
<>
<script async src={`https://www.googletagmanager.com/gtag/js?id=${id}`} />
<script
async
id="gtag-init"
dangerouslySetInnerHTML={{
__html: `window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
@@ -255,7 +253,9 @@ function GTM({ id }: { id: string }) {
security_storage: "denied"
});
gtag('config', '${id}');`,
gtag('config', '${id}', {
page_path: window.location.pathname,
});`,
}}
/>
</>