• 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;
    </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 to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    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 4 years, 2 months ago by Weston Ruter.
    Plugin Author Weston Ruter

    (@westonruter)

    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://www.ads-software.com/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.