• I have set up ads to show only on AMP pages, with the following settings:

    AMP Compatibility
    Status : enable Edit

    Non AMP Visibility
    Status : hide Edit

    Nevertheless, we see a string ‘Advertisement’ on even ‘regular’ (non-amp) pages. Not the ad itself, just the placeholder – which is really the following in code:

    <div data-ad-id=”391″ style=”text-align:left;margin-top:px;margin-bottom:px;margin-left:px;margin-right:px;float:none;” class=”afw afw_custom afw_ad afwadid-391 “>
    <div style=”font-size:10px;text-align:left;color:#cccccc;”>Advertisement</div>
    <amp-ad layout=”fluid” width=”336″ height=”fluid” type=”doubleclick” data-slot=”/5966054/Bla/Bla_amp_intext” data-multi-size=”300×250,336×280″ rtc-config=”{"vendors": {"prebidappnexus": {"PLACEMENT_ID": "18400289"},"criteo": {"NETWORK_ID": 6870}}, "timeoutMillis": 600}”>
    </amp-ad>
    </div>

    How can I get rid of this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Daniele Muscetta

    (@dani3l3)

    Nevermind, I got confused: we have two similar sites with very similar settings and I was looking at the wrong one. It does work. Apologies for the randomization.

    Thread Starter Daniele Muscetta

    (@dani3l3)

    OK, the setting (when set) actually hides the ad… nevertheless, something is trying to load anyways on the ‘regular’ pages (I only have ads enabled for AMP pages) and it fails because jQuery hasn’t loaded yet.

    I see this failing in console (and even google mobile-friendly test flags it):

    <script type=”text/javascript”>
    jQuery(document).ready( function($) {
    if ($(‘#adsforwp-hidden-block’).length == 0 ) {
    $.getScript(“https://www.mysite.foo/front.js&#8221;);
    }
    });
    </script>

    I get a Uncaught ReferenceError: jQuery is not defined on ‘regular’ pages.
    On AMP pages this does not happen.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide on non-AMP only partially ‘hiding’’ is closed to new replies.