Merged PR 1233: build fix for async scripts

build fix for async scripts

Related work items: #12123
This commit is contained in:
Robert Bond
2024-09-05 14:15:20 +00:00
+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 || [];