# 如何在\</head\>中添加 Google Auto Ads 代码

**URL:** https://meta.discourse.org/t/how-to-add-google-auto-ads-code-in-head/109672
**Category:** Support
**Created:** [2019年二月20日 16:58 UTC](https://meta.discourse.org/t/how-to-add-google-auto-ads-code-in-head/109672 "2019-02-20T16:58:28Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![devzero](https://avatars.discourse-cdn.com/v4/letter/d/ce73a5/32.png) [@devzero](https://meta.discourse.org/u/devzero)
#### Post date: [2019年六月25日 17:33 UTC](https://meta.discourse.org/t/how-to-add-google-auto-ads-code-in-head/109672/7 "2019-06-25T17:33:41Z")

</div>

I mentioned this on another similar post also – wanted to xpost it here to make sure people finding this one in search are also aware.

I was having similar issues, and upon viewing the source of the page served, found that Discourse was stripping out the inline Javascript entirely.

This post mentions it:

> [@EPN Smart Links](https://meta.discourse.org/t/epn-smart-links/116293/4):
>
> That line should be extracted into a theme file, since inline Javascript is not allowed in recent versions of Discourse (for CSP). Did you check all theme JavaScript files too?

but I don’t see a solution there.

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-google-auto-ads-code-in-head/109672)._
