Tried implementing amp-ad to render video ads in amp pages, but facing below issue.
<div class='ad-banner' id="div-gpt-ad-xxxxxxxxx-1">
<amp-ad layout=fluid height=fluid type="doubleclick" data-slot="/12431234343/Qa/Android_Mobile_Web/Home" json="{"targeting":{"NativeType":"videoad"}}">
</amp-ad>
In ad response we could see the proper response, but in elements we could see height=0 or hidden attrb has been added as part of amp-ad element. So rendered ad is not visible in the front end.
So is there anyway to render ad without amp-ads or the above one is resolvable.
The layout type of
fluidisn't valid per theamp-adcomponent specifications, you requirefill,fixed,fixed-height,flex-item,intrinsic,nodisplay, orresponsive. Also you need to define aheightandwidthvalue for your advertisement on the amp-ad element depending on the layout type selected.From the amp-ad documentation:
It's likely that the combination of these issues is causing the advertisement to hide.