# GTM이 Content Security Policy 위반으로 스크립트 로딩을 거부합니다

**URL:** https://meta.discourse.org/t/gtm-refused-to-load-the-script-because-it-violates-the-content-security-policy/194058
**Category:** Data & reporting
**Created:** [6월 16, 2021, 1:06오후 UTC](https://meta.discourse.org/t/gtm-refused-to-load-the-script-because-it-violates-the-content-security-policy/194058 "2021-06-16T13:06:41Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![narayanan](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@narayanan](https://meta.discourse.org/u/narayanan)
#### Post date: [6월 16, 2021, 1:06오후 UTC](https://meta.discourse.org/t/gtm-refused-to-load-the-script-because-it-violates-the-content-security-policy/194058/1 "2021-06-16T13:06:42Z")

</div>

안녕하세요,

Discourse에 새로운 GTM 컨테이너를 추가하려고 합니다. 그런데 다음과 같은 오류가 발생하고 있습니다.

```plaintext
Refused to load the script "https://forums.techsoup.org/_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=1&cb=1660101200' because it violates the following Content Security Policy directive: "script-src https://forums.techsoup.org/logs/ https://forums.techsoup.org/sidekiq/ https://forums.techsoup.org/mini-profiler-resources/ https://forums.techsoup.org/assets/ https://forums.techsoup.org/brotli_asset/ https://forums.techsoup.org/extra-locales/ https://forums.techsoup.org/highlight-js/ https://forums.techsoup.org/javascripts/ https://forums.techsoup.org/plugins/ https://forums.techsoup.org/theme-javascripts/ https://forums.techsoup.org/svg-sprite/ https://www.googletagmanager.com/gtm.js 'nonce-0cac1a2cef90863cc692ed7f68c5f4f0'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback"

```

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/b/fb3d203c0d43bacfff13ed6996c21a790abe20da.png)

---

<div class="post-metadata">

### Author: ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)
#### Post date: [6월 16, 2021, 1:46오후 UTC](https://meta.discourse.org/t/gtm-refused-to-load-the-script-because-it-violates-the-content-security-policy/194058/2 "2021-06-16T13:46:07Z")

</div>

콘텐츠 보안 정책(CSP)에 새로운 스크립트를 추가해야 합니다.

> [@Integrate Google Tag Manager with Google Analytics](https://meta.discourse.org/t/setup-google-tag-manager-for-analytics/47335):
>
> bookmark This guide will help you set up Google Tag Manager and use it with Google Analytics on your Discourse site. Additionally, it covers configuring variables, triggers, and tags in Google Tag Manager to track page views. information_source This guide covers setting up Google Tag Manager. If you only want to enable Google Analytics for your site, set the G-Tag in the ga universal tracking code site setting. Our settings may still refer to all analytics as universal, but this is a legac…

> [@system](#):
>
> 보안상의 이유로, 최신 Discourse 설치 환경에는 모든 비-Discourse 스크립트를 차단하는 콘텐츠 보안 정책(CSP)이 적용되어 있습니다. 따라서 GTM 통합에 외부 스크립트를 추가하는 경우, 해당 스크립트가 실행될 수 있도록 해당 도메인을 허용 목록(allowlist)에 추가해야 할 수 있습니다.

---

<div class="post-metadata">

### Author: ![narayanan](https://avatars.discourse-cdn.com/v4/letter/n/ce73a5/32.png) [@narayanan](https://meta.discourse.org/u/narayanan)
#### Post date: [6월 16, 2021, 4:29오후 UTC](https://meta.discourse.org/t/gtm-refused-to-load-the-script-because-it-violates-the-content-security-policy/194058/3 "2021-06-16T16:29:34Z")

</div>

Twitter 분석과 어떻게 통합하는지 알려주실 수 있나요?

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [7월 3, 2023, 9:27오전 UTC](https://meta.discourse.org/t/gtm-refused-to-load-the-script-because-it-violates-the-content-security-policy/194058/4 "2023-07-03T09:27:30Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
