# We couldn't find the code on your site

**URL:** https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847
**Category:** Support
**Tags:** advertising
**Created:** [28.Май.2019 07:36:16 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847 "2019-05-28T07:36:16Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Viki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viki/32/131139_2.png) [@Viki](https://meta.discourse.org/u/Viki)
#### Post date: [28.Май.2019 07:36:16 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/1 "2019-05-28T07:36:16Z")

</div>

Hello,  
I have applied **Adsense** for my discourse site.  
I pasted the Adsense code in `</head>` section.  
**Google** responses with

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/5/e5b444a8332056bf27a0e3e66eca63db66e07284.png)

**Error logs shows**

![image](https://global.discourse-cdn.com/meta/original/3X/e/0/e0bd56b09824489509820c01e854f1c0a7fe99dd.png)

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [28.Май.2019 07:47:44 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/2 "2019-05-28T07:47:44Z")

</div>

It’s because you’re trying to run in-line JavaScript, which can cause some problems. This is why Discourse has removed it. For more information, go here:

> [@Mitigate XSS Attacks with Content Security Policy](https://meta.discourse.org/t/mitigate-xss-attacks-with-content-security-policy/104243):
>
> bookmark This guide explains how to use Content Security Policy (CSP) to mitigate Cross-Site Scripting (XSS) attacks in Discourse. It covers CSP basics, configuration, and best practices. person_raising_hand Required user level: Administrator Summary Content Security Policy (CSP) is a crucial security feature in Discourse that helps protect against Cross-Site Scripting (XSS) and other injection attacks. This guide covers the basics of CSP, how it’s implemented in Discourse, and how to c…

---

<div class="post-metadata">

### Author: ![Viki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viki/32/131139_2.png) [@Viki](https://meta.discourse.org/u/Viki)
#### Post date: [28.Май.2019 07:48:19 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/3 "2019-05-28T07:48:19Z")

</div>

Thank you @Chaboi_3000

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [28.Май.2019 07:49:52 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/4 "2019-05-28T07:49:52Z")

</div>

Oh, and @Viki, you can use this plugin in your site for AdSense. I think this should help with your In-line JS problem:  
[https://meta.discourse.org/t/google-adsense-plugin/11763](https://meta.discourse.org/t/google-adsense-plugin/11763)

---

<div class="post-metadata">

### Author: ![Viki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viki/32/131139_2.png) [@Viki](https://meta.discourse.org/u/Viki)
#### Post date: [28.Май.2019 07:57:13 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/5 "2019-05-28T07:57:13Z")

</div>

I am using `discourse-adplugin`  
[https://github.com/discourse/discourse-adplugin](https://github.com/discourse/discourse-adplugin)  
I disabled CSP & CSPR reports.

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [28.Май.2019 08:09:59 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/6 "2019-05-28T08:09:59Z")

</div>

> [@Viki](#):
>
> I disabled CSP & CSPR reports.

Never mind. I’m sorry. I messed that up. 😟 You just have to go to `https://example-forum.com/admin/site_settings/category/adsense_plugin` and fill in the details and follow the steps here:  
[https://github.com/discourse/discourse-adplugin#step-2b---input-your-details](https://github.com/discourse/discourse-adplugin#step-2b---input-your-details)

---

<div class="post-metadata">

### Author: ![Viki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viki/32/131139_2.png) [@Viki](https://meta.discourse.org/u/Viki)
#### Post date: [28.Май.2019 08:24:00 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/7 "2019-05-28T08:24:00Z")

</div>

No problem @Chaboi_3000 🙂  
I think we have to fill the details after we get Adsense approval from Google.

---

<div class="post-metadata">

### Author: ![Chaboi\_3000](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chaboi_3000/32/163015_2.png) [@Chaboi\_3000](https://meta.discourse.org/u/Chaboi_3000)
#### Post date: [28.Май.2019 08:55:08 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/8 "2019-05-28T08:55:08Z")

</div>

You might want to contact Google about that. 🙂

---

<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: [18.Октябрь.2022 14:08:59 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/9 "2022-10-18T14:08:59Z")

</div>



---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [18.Октябрь.2022 14:15:10 UTC](https://meta.discourse.org/t/we-couldnt-find-the-code-on-your-site/118847/10 "2022-10-18T14:15:10Z")

</div>


