检测谷歌响应空adsense

时间:2015-09-05 18:33:47

标签: adsense

我正在使用谷歌adsense响应式广告。 有时adsense找不到广告并留下空白。 有没有办法,使用javascript来确定adsense块是否为空?而且我将隐藏整个adsense容器。

以下是我为adsense使用的代码:



<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                        <!-- Sidebar skyscrapper -->
                        <ins class="adsbygoogle"
                            style="display: block; width: 300px; height: 600px"
                            data-ad-client="ca-pub-xxxxxx"
                            data-ad-slot="xxxxxx"
                            data-ad-format="auto"></ins>
                        <script>
                            (adsbygoogle = window.adsbygoogle || []).push({});
                        </script>
&#13;
&#13;
&#13;

 <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                    <!-- Sidebar skyscrapper -->
                    <ins class="adsbygoogle"
                        style="display: block; width: 300px; height: 600px"
                        data-ad-client="ca-pub-xxxxxx"
                        data-ad-slot="xxxxxx"
                        data-ad-format="auto"></ins>
                    <script>
                        (adsbygoogle = window.adsbygoogle || []).push({});
                    </script>

0 个答案:

没有答案