# Google Tag Manager (gtm) 脚本被 CSP 阻止

**URL:** https://meta.discourse.org/t/google-tag-manager-gtm-script-blocked-by-csp/270210
**Category:** Data & reporting
**Tags:** analytics
**Created:** [2023年六月30日 23:26 UTC](https://meta.discourse.org/t/google-tag-manager-gtm-script-blocked-by-csp/270210 "2023-06-30T23:26:29Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![MarkDoerr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markdoerr/32/549630_2.png) [@MarkDoerr](https://meta.discourse.org/u/MarkDoerr)
#### Post date: [2023年七月3日 19:30 UTC](https://meta.discourse.org/t/google-tag-manager-gtm-script-blocked-by-csp/270210/5 "2023-07-03T19:30:19Z")

</div>

你好 Ty，

看起来你目前有几个脚本被阻止了，你可能需要将它们添加到你的 CSP 中：

 ![Screenshot 2023-07-03 at 12.26.00 PM](https://global.discourse-cdn.com/meta/original/4X/e/1/4/e14eb81906d2b80b52ec3ced661999f08ed5c223.jpeg)

我还看到你在控制台中遇到了一个 nonce 错误。你尝试过 [配置 GTM 来处理这些错误](https://meta.discourse.org/t/use-nonces-in-google-tag-manager-scripts/188296) 吗？

最后，我会尝试将 `https://*.googletagmanager.com` 添加到你的允许列表中。

---

_[View the full topic](https://meta.discourse.org/t/google-tag-manager-gtm-script-blocked-by-csp/270210)._
