I'm having problem with amp-ad.
<!DOCTYPE html>
<html amp lang="en">
<head>
<meta charset="utf-8">
<script async custom-element="amp-ad" src="https://cdn.ampproject.org/v0/amp-ad-0.1.js"></script>
<script async src="https://cdn.ampproject.org/v0.js"></script>
<meta name="viewport" content="width=device-width,minimum-scale=1">
<link rel="canonical" href="http://localhost:9000/simple-test.html">
<title>AMP Test</title>
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
</head>
<body>
<section id="content">
<div style="width: 728px; height: 90px">
<amp-ad width=728 height=90
type="adsense"
data-ad-client="ca-pub-XXXXXXXXXXXXXXXXX"
data-ad-slot="XXXXXXXXX">
</amp-ad>
</div>
</section>
</body>
</html>
It's not being displayed. Instead there is element with specified dimensions, it inserts some scripts and iframes, but there's no ad in there. I tried all available layouts. I also tried with different ad sizes. The code is ok according to validator.
Traditional JavaScript versions works fine. Any help?
< link rel="canonical" href="http://localhost:9000/simple-test.html">
Adsense AMP ads are not shown on local development sites. Uploading this to a live site will probably work. Also make sure that your domain is whitelisted in the adsense settings.