Mobile app version of vmapp.org
Login or Join
Merenda212

: Google Ads randomly stopped showing on mobile devices? I have a responsive Google Ad on my page built using Bootstrap. The Ad has shown in the past, but recently I noticed whilst on the site

@Merenda212

Posted in: #GoogleAdsense

I have a responsive Google Ad on my page built using Bootstrap.

The Ad has shown in the past, but recently I noticed whilst on the site on my iPhone the Ad isn't being shown. The Ad continues to be shown on computers.

Here is the code:

<div class="row">
<div class="col-md-4">
<h2>Header</h2>
<p>Content</p>
<p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
</div>
<div class="col-md-4">
<h2>Header</h2>
<p>Content</p>
<p><a class="btn btn-default" href="#" role="button">View details &raquo;</a></p>
</div>
<div class="col-md-4">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Ad -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-X"
data-ad-slot="7965675519"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>


Is there a solution?

Tested using an iPhone emulator at mobiletest.me/ and the Ad is shown, but it isn't shown using a real iPhone.

Tested using Google Chrome on iOS and the Ad is shown, but it isn't shown using Safari on iOS.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Merenda212

1 Comments

Sorted by latest first Latest Oldest Best

 

@Annie201

The problem I have with the newest ad implementation is that it doesn't validate well with w3c. I use the following type of implementation to display a 300 px by 250 px ad unit and it works in every browser I tried. The only complaint I get with w3c is that in HTML 4.01 strict mode, async is not valid inside a script tag.

<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" type="text/javascript"></script>
<ins class="adsbygoogle" style="display:block;width:300px;height:250px">
</ins>
<script type="text/javascript">
(adsbygoogle=window.adsbygoogle||[]).push({params:{data_override_format:"true",data_page_url:"http://example.com/",google_ad_slot:"###",google_ad_client:"ca-pub-X",google_ad_width:300,google_ad_height:250}});
</script>


In the code, replace example.com with the full URL to the page the ad is on.

I'm not sure what browser you were using that didn't show the ads but if this code works and yours doesn't then we all need to complain to google that their code simply does not work as-is.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme