Commit 496858d8 authored by tom goriunov's avatar tom goriunov Committed by GitHub

GA: fix inline-script CSP issue (#1358)

Fixes #1353
parent d3f3eaa7
......@@ -16,7 +16,7 @@ export function googleAnalytics(): CspDev.DirectiveDescriptor {
],
'script-src': [
// inline script hash, see ui/shared/GoogleAnalytics.tsx
'\'sha256-NTmEg2dBnojQfTYrYJEmp3nG7V66756qPbQMCIBrctk=\'',
'\'sha256-WXRwCtfSfMoCPzPUIOUAosSaADdGgct0/Lhmnbm7MCA=\'',
'https://www.googletagmanager.com',
'*.google-analytics.com',
'*.analytics.google.com',
......
......@@ -20,7 +20,7 @@ const GoogleAnalytics = () => {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '${ id }');
gtag('config', window.__envs.NEXT_PUBLIC_GOOGLE_ANALYTICS_PROPERTY_ID);
` }
</Script>
</>
......
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