Title: Auto ads code is missing
Last modified: September 19, 2020

---

# Auto ads code is missing

 *  [Anyanwu Valentine](https://wordpress.org/support/users/six9ja/)
 * (@six9ja)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/auto-ads-code-is-missing/)
 * Good day great developers, I’m having some difficulties trying to add javascript
   to my amp header, after trying my best my day will end without any solution.
 * I added Google ads javascript; “<script async custom-element=”amp-auto-ads”
    
   src=”[https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js”&gt](https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js”&gt);
   </script>” to html-start.php, but when I source to check nothing is there.
 * Urgent help is needed on six9ja.com !!!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fauto-ads-code-is-missing%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/auto-ads-code-is-missing/#post-13428034)
 * The AMP plugin adds this script automatically when there is an `<amp-auto-ads
   >` tag on the page. You don’t have to add it yourself. In fact, if you add it
   yourself without also adding a `<amp-auto-ads>` then the AMP plugin will remove
   the script since it is unused.
 * In any case, why are you manually adding `amp-analytics` to the template? Can’t
   you provide it via the Analytics section of the AMP settings screen?
    -  This reply was modified 5 years, 8 months ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/auto-ads-code-is-missing/#post-13428051)
 * Edited my reply as I see you posted about auto-ads not analytics.
 * In the case of auto ads, we recommend you use the Site Kit plugin to config this
   for you: [https://wordpress.org/plugins/google-site-kit/](https://wordpress.org/plugins/google-site-kit/)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Auto ads code is missing’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)

 * 2 replies
 * 2 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/auto-ads-code-is-missing/#post-13428051)
 * Status: not resolved