1
I have 3 Google Adsense scripts with 300 x 250 - 160 x 600 - 728 x 90
How I do for each time the page is loaded 1 of these scripts is shown?
I would like each page Reload to be shown 1 script.
Example:
I own the one that is used for iframe, but in the case of Adsense I need to use the full script.
<script language="JavaScript">
var quotes=new Array()
quotes[0]='<iframe frameborder="0" height="250" name="videoplayer"
scrolling="no" src="http://" style="border: 0px #FFFFFF none;" width="300">
</iframe>'
quotes[1]='<iframe frameborder="0" height="250" name="videoplayer"
scrolling="no" src="http://"
style="border: 0px #FFFFFF none;" width="300"></iframe>'
quotes[2]='<iframe frameborder="0" height="250" name="videoplayer"
scrolling="no" src="http://" style="border: 0px #FFFFFF none;" width="300"></iframe>'
var whichquote=Math.floor(Math.random()*(quotes.length))
document.write(quotes[whichquote])
</script>
Blocks I want to use in mo Randon
<script async
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script>
<!-- lateral -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-2068602933738629"
data-ad-slot="8173528505"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script async
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script> <ins
class="adsbygoogle"
style="display:inline-block;width:160px;height:600px"
data-ad-client="ca-pub-2068602933738629"
data-ad-slot="2353050305"></ins> <script>(adsbygoogle =
window.adsbygoogle || []).push({});</script>
<script async
src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script>
<!-- celular -->
<ins class="adsbygoogle"
style="display:inline-block;width:320px;height:100px"
data-ad-client="ca-pub-2068602933738629"
data-ad-slot="6337832563"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
And you want to avoid repeating one of them before you "turn around" or it can be repeated randomly?
– Sergio
Can be repeated, but other scripts are also shown
– Endou
I put an answer. If you have code or urls of these scripts that you don’t know how to integrate put in the question.
– Sergio
I added an example to the answer.
– Sergio
I added the scripts I want to use, this example of iframe I showed I can’t use, google won’t let me, I need to use google’s own code on the page, I can’t use iframe
– Endou
This football is out of this world huehuehuehue
– Klaider