AMP AUTO ADS SCRIPT VALIDATION

Posted in: Newspaper
Post count: 44

Hello, Its been two days since I implement amp auto ads in my website. I read all the comments posible, but auto ads are not showing. Please if you can kindly review my script and tell me if it is correct.

thank you

I modified the HTML-START.php file

<?php
/**
* HTML start template part.
*
*/
?>

<!doctype html>
<html amp <?php echo AMP_HTML_Utils::build_attributes_string( $this->get( ‘html_tag_attributes’ ) ); ?>>
<head>
<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no”>
<?php do_action( ‘amp_post_template_head’, $this ); ?>
<style amp-custom>
<?php require_once(‘style.php’); ?>
<?php do_action( ‘amp_post_template_css’, $this ); ?>
</style>
<script async custom-element=”amp-auto-ads”
src=”https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js”&gt;
</script>

</head>

<body class=”<?php echo esc_attr( $this->get( ‘body_class’ ) ); ?>” itemscope=”itemscope” itemtype=”<?php echo td_global::$http_or_https?>://schema.org/WebPage”>
<amp-auto-ads type=”adsense”
data-ad-client=”ca-pub-XXXXXXXXXX”>
</amp-auto-ads>

<div id=”td-outer-wrap”>

Post count: 20688

Hi,

Those would be the requirements for auto ads from what I know. Be sure to test with a mobile emulator or actual mobile. The ads will not show on desktop if that is how you are checking. I could take a look if you can provide a link to your website.

Thanks

Post count: 44

thank you Simion always for your reply.

https://cosasdeljardin.com/plantas-ornamentales/hortensias/como-cambiar-el-color-de-las-hortensias/amp is an amp post.

Im not testing the site as I dont know how to identify the amp auto ads.

but what Im reading is the amp/autoad report in the adsense dashboard. And I am getting no Autoadd impressions

I only got auto ads when I installed a third party plugin: themoneytizer plugin but it was not a good plugin so I deleted it.

So the html-start code is ok? Im having trouble deciding where was the “inmidiately after the body tag” as there is no clear <Body> tag
so I put it under the whole <body class…> expression

Post count: 44

YES!!! THE SCRIPT WORKS!!
72 hs after uploading the script, the auto amp ads appeared in my adsense dashboard

Post count: 20688

Glad it works, I checked and the ads appear for me at the moment
https://www.screencast.com/t/3G28dgtLHXv

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.