I want to integrate the Google Adwords conversion script to my web app, therefore I have to extend my CSP rule to allow this one.
I face problem allowing https://www.google.xx/ads/
into script-src
policy because it looks like, depending of the region, that the domain gonna change.
For example, if I access the page in Switzerland, the allowed script should be https://www.google.ch/ads/
but if I access it in Romania, the allowed script should be https://www.google.ro/ads/
etc.
How could I allow all domains in my policy without having to list all countries and regions of the world?
Thx in advance for the help
P.S.: Console stacktrace
Refused to load the script 'https://www.google.ro/ads/user-lists/8...
P.P.S: I tried to whitelist it using nonce
but it looks like that the following script can't be whitelisted like this
<script nonce="random-base64">
window.dataLayer = window.dataLayer || [];
var gtag = function gtag(){ // <---- There, CSP problem
dataLayer.push(arguments);
};
gtag('js', new Date());
gtag('config', 'SOMETHING');
</script>
P.P.P.S.: Same problem with img-src
btw. Google Adwords CSP (content security policy) img-src