# How to Add Google Auto Ads Code in \</head\>

**URL:** <https://meta.discourse.org/t/how-to-add-google-auto-ads-code-in-head/109672>\
**Category:** Product Support\
**Created:** [February 20, 2019, 4:58pm 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:** 1

<div class="post-metadata">

**Author:** ![Vikas\_Dangi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vikas_dangi/32/131628_2.png) [@Vikas\_Dangi](https://meta.discourse.org/u/Vikas_Dangi)\
**Post date:** [February 20, 2019, 4:58pm UTC](https://meta.discourse.org/t/how-to-add-google-auto-ads-code-in-head/109672/1 "2019-02-20T16:58:28Z")

</div>

I wanted to add adsense auto ads code to `</head>` of my every topic.

I have tried to add the following auto ads code in themes head section

```
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script> 
<script>
 (adsbygoogle = window.adsbygoogle || []).push({
      google_ad_client: "ca-pub-87837185XXXXXXXX",
      enable_page_level_ads: true
 });
</script>

```

But no success.

---

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