# "Refused to load the script" when adding adsense

**URL:** https://meta.discourse.org/t/refused-to-load-the-script-when-adding-adsense/108630
**Category:** Support
**Created:** [February 7, 2019, 7:09pm UTC](https://meta.discourse.org/t/refused-to-load-the-script-when-adding-adsense/108630 "2019-02-07T19:09:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Jeremy\_R](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeremy_r/32/130216_2.png) [@Jeremy\_R](https://meta.discourse.org/u/Jeremy_R)
#### Post date: [February 7, 2019, 7:09pm UTC](https://meta.discourse.org/t/refused-to-load-the-script-when-adding-adsense/108630/1 "2019-02-07T19:09:25Z")

</div>

Hello,

I added the google adsense / facebook pixel to the forum header but it seem that they can’t be loaded :

 ![del](https://global.discourse-cdn.com/meta/original/3X/a/5/a5ae5f741e1b67cd6372a3b7bec5bb2be4f3a923.png)

Any idea ?

Thank you 🙂

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [February 7, 2019, 7:14pm UTC](https://meta.discourse.org/t/refused-to-load-the-script-when-adding-adsense/108630/2 "2019-02-07T19:14:12Z")

</div>

Please refer to our CSP docs:

> [@Mitigate XSS Attacks with Content Security Policy](https://meta.discourse.org/t/mitigate-xss-attacks-with-content-security-policy/104243/1):
>
> #### 3. `<script>` Tags Linking to External Resources
> 
> If your site’s customizations depend on third-party JavaScripts, you may either
> 
> 1. Copy and paste the script content into your theme / component, or
> 2. [Extend the default CSP](#heading--extend-default-csp) by whitelisting the source.
> 
> #### 4. Third-Party Script / Service Integration
> 
> Different integrations will have different requirements, but can be addressed similarly.
> 
> You could look up the integration’s recommended CSP whitelist, and extend the default CSP accordingly. I suggest simply [turn on CSP Report Only mode in Discourse](#heading--available-settings), and watch your console and/or `/logs` to determine which resources you’ll need to whitelist to make your integrations work.

---

<div class="post-metadata">

### Author: ![Jeremy\_R](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeremy_r/32/130216_2.png) [@Jeremy\_R](https://meta.discourse.org/u/Jeremy_R)
#### Post date: [February 8, 2019, 8:47am UTC](https://meta.discourse.org/t/refused-to-load-the-script-when-adding-adsense/108630/3 "2019-02-08T08:47:22Z")

</div>

Thank you 🙂

---

<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: [March 10, 2019, 8:47am UTC](https://meta.discourse.org/t/refused-to-load-the-script-when-adding-adsense/108630/4 "2019-03-10T08:47:43Z")

</div>

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