Adsense - custom fallback

Viewed 196

I know I can specify an static image / url / etc. in the Adsense management panel for my ad. But I want to display a banner from one of our clients randomly if google has no ad for me (the ad stays just white).

Is there any callback from the javascript I embed to show the ads which I can use?

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
 style="display:block"
 data-ad-format="fluid"
 data-ad-layout-key="-mylayoutkey"
 data-ad-client="ca-pub-12345"
 data-ad-slot="12345"></ins>
<script>
// can I hook in here?
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

In short:

1. check if google can display an ad
2a. if no ad can be displayed, show a random banner from my clients
2b. if an ad can be displayed, show the ad
0 Answers
Related