build fix for async scripts

This commit is contained in:
2024-09-05 13:54:01 +01:00
parent fe5c683a80
commit 8dbfda7dde
+4 -2
View File
@@ -6,12 +6,14 @@ export const Tracking = ({ googleTagManagerID, nonce, cookieObj }) => {
return ( return (
<Fragment> <Fragment>
<script <script
strategy="afterInteractive" async
// strategy="afterInteractive"
src={`https://www.googletagmanager.com/gtag/js?id=${googleTagManagerID}`} src={`https://www.googletagmanager.com/gtag/js?id=${googleTagManagerID}`}
/> />
<script <script
async
id="google-analytics" id="google-analytics"
strategy="afterInteractive" // strategy="afterInteractive"
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: ` __html: `
window.dataLayer = window.dataLayer || []; window.dataLayer = window.dataLayer || [];