codler / react-ga4

React Google Analytics 4
https://www.npmjs.com/package/react-ga4
266 stars 34 forks source link

General question: Adding hash #69

Open karolis-666 opened 7 months ago

karolis-666 commented 7 months ago

Hello,

Does anyone encountered issue with adding hashed value? Didn't found inside docs how to implement it using ReactGA.initialize().

So far did it with JS by finding script in html head and adding additional tags crossorigin and integrity with hash, but then get :

Failed to find a valid digest in the 'integrity' attribute for resource 'https://www.googletagmanager.com/gtag/js?id={MY_MEASSUREMENT)_ID}' with computed SHA-256 integrity {SHA256_CODE}. The resource has been blocked

Read a bit google docs, but nothing particular with hashes. Maybe someone knows solution?