elgorditosalsero / react-gtm-hook

Easily manage the Google Tag Manager via Hook
https://elgorditosalsero-react-gtm-hook.netlify.app/
MIT License
220 stars 28 forks source link

How to specify nonce? #39

Closed daisy1754 closed 2 years ago

daisy1754 commented 2 years ago

I want to set up CSP for our site. To do it properly (without using unsafe-eval), I need to specify nonce to script tag https://developers.google.com/tag-manager/web/csp

Is there a way to do it via this library?

elgorditosalsero commented 2 years ago

Hi @daisy1754,

nope, at the moment this feature of the GTM is not supported.

daisy1754 commented 2 years ago

are you open to PR? I can try

elgorditosalsero commented 2 years ago

are you open to PR? I can try

@daisy1754 yeah, sure :)