htmladsamp-htmlgoogle-ampamp-ad

DoubleClick AMP Ad not showing in some browsers


I'm mainly seeing this issue in Chrome but also in FF. I'm trying to load an amp-ad from the doubleclick ad platform but the ad shows a blank ad and the response header shows x-xss-protection:1; mode=block

Here is my code:

<div class="text-ad">
    <amp-ad width=216 height=36
        type="doubleclick"
        data-slot="/1025373/test_ad">
    </amp-ad>
</div>

The code does validate as proper amp code and I have been able to get the ad to load in Safari. Any help would be appreciated.


Solution

  • I don't know if it's the same issue I was having, but I was getting an error in the console that said something like "amp ads cannot be placed in containers that have position fixed." I was using position:sticky for the right rail, and since position sticky isn't supported in Safari, my amp-ads were appearing in Safari, but not any other browsers.