Unverified Commit 3fcd1a1f authored by Abdelrahman Mohamed's avatar Abdelrahman Mohamed Committed by GitHub

Allow passing a nonce to google tag manager related script (#73370)

What 

Adding nonce in script in google tag manager

Why 

Prevent from using csp header inline script or adding url manually in
csp headers by package users.

How

passing nonce to the script.
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 1f44f13a
......@@ -55,6 +55,7 @@ export function GoogleTagManager(props: GTMParams) {
id="_next-gtm"
data-ntpc="GTM"
src={`${gtmScriptUrl}?id=${gtmId}${gtmLayer}${gtmAuth}${gtmPreview}`}
nonce={nonce}
/>
</>
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment