chore: support Zendesk widget (#25517)
This commit is contained in:
@@ -24,7 +24,7 @@ const GA: FC<IGAProps> = ({
|
||||
if (IS_CE_EDITION)
|
||||
return null
|
||||
|
||||
const nonce = process.env.NODE_ENV === 'production' ? (headers() as unknown as UnsafeUnwrappedHeaders).get('x-nonce') : ''
|
||||
const nonce = process.env.NODE_ENV === 'production' ? (headers() as unknown as UnsafeUnwrappedHeaders).get('x-nonce') ?? '' : ''
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -32,7 +32,7 @@ const GA: FC<IGAProps> = ({
|
||||
strategy="beforeInteractive"
|
||||
async
|
||||
src={`https://www.googletagmanager.com/gtag/js?id=${gaIdMaps[gaType]}`}
|
||||
nonce={nonce!}
|
||||
nonce={nonce ?? undefined}
|
||||
></Script>
|
||||
<Script
|
||||
id="ga-init"
|
||||
@@ -44,14 +44,14 @@ gtag('js', new Date());
|
||||
gtag('config', '${gaIdMaps[gaType]}');
|
||||
`,
|
||||
}}
|
||||
nonce={nonce!}
|
||||
nonce={nonce ?? undefined}
|
||||
>
|
||||
</Script>
|
||||
{/* Cookie banner */}
|
||||
<Script
|
||||
id="cookieyes"
|
||||
src='https://cdn-cookieyes.com/client_data/2a645945fcae53f8e025a2b1/script.js'
|
||||
nonce={nonce!}
|
||||
nonce={nonce ?? undefined}
|
||||
></Script>
|
||||
</>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user