{"data":{"id":"ACSD-60788","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where custom scripts for Google Tag Manager are not executed due to Content Security Policy (CSP) errors.","categories":["Other"],"components":["magento/module-csp","magento/module-google-tag-manager"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-52/acsd-60788-fixes-issue-where-custom-scripts-for-google-tag-manager-are-not-executed-due-to-content-security-policy-errors","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-52/acsd-60788-fixes-issue-where-custom-scripts-for-google-tag-manager-are-not-executed-due-to-content-security-policy-errors.md","blobSha":"0262c1ebd5da053619efbf76bebd1937db4a5307","description":"Custom scripts for Google Tag Manager are not executed due to Content Security Policy (CSP) errors.","stepsToReproduce":"1. Set up the Google Tag Manager variable. 1. Set up the Google Tag Manager Custom HTML Tag. 1. Place the following JavaScript code in the first Tag: <script nonce=\"{{gtmNonce}}\"> console.log(\"Nonce from simple JS {{gtmNonce}}\"); </script> 1. Flush caches after setting up the GTM. 1. Open the developer console in your browser. 1. Open the Home Page.","introducedInQpt":"1.1.52","createdFor":["2.4.7-p1"],"documentedRange":"2.4.7 - 2.4.7-p3","scheduledFixRelease":"2.4.8"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.7 <2.4.8","path":"patches/os/ACSD-60788_2.4.7-p1.patch","blobSha":"c8fba951e882bd022e2d4bf77e026f67b0634dc2","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-60788_2.4.7-p1.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-csp/ViewModel/NonceProvider.php","change":"added","package":"magento/module-csp"},{"path":"vendor/magento/module-csp/view/base/requirejs-config.js","change":"added","package":"magento/module-csp"},{"path":"vendor/magento/module-csp/view/base/templates/nonce/nonce.phtml","change":"added","package":"magento/module-csp"},{"path":"vendor/magento/module-csp/view/base/web/js/nonce-injector.js","change":"added","package":"magento/module-csp"}],"packages":["magento/module-csp"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"magento-commerce":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false},{"package":"magento/magento2-ee-base","constraint":">=2.4.7 <2.4.8","path":"patches/commerce/ACSD-60788_2.4.7-p1.patch","blobSha":"21a30b7ab0f7238d033192996c3530a9baaa9319","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/commerce/ACSD-60788_2.4.7-p1.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-google-tag-manager/view/frontend/layout/default.xml","change":"modified","package":"magento/module-google-tag-manager"}],"packages":["magento/module-google-tag-manager"],"hasTests":false,"applicableVersions":{"magento-community":[],"magento-commerce":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":null,"deprecated":false}],"applicableVersions":{"magento-community":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"magento-commerce":["2.4.7-p10","2.4.7-p9","2.4.7-p8","2.4.7-p7","2.4.7-p6","2.4.7-p5","2.4.7-p4","2.4.7-p3","2.4.7-p2","2.4.7-p1","2.4.7"],"mage-os":[]},"conditions":null,"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACSD-60788 details"}