I've found a number of sites that explain how to make a DFP ad reload/refresh after 30-120 seconds, but none of them explain if it's possible to do with an Adsense ad.
I've tried DFP - it's very confusing compared to Adsense.
My current Adsense code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- MYSITE- Responsive - #1 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-123456789..."
data-ad-slot="123456789"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
AdSense's TOS disallow the sort of automatic refreshing you're referring to. This does not mean that you cannot automatically refresh AdSense Tags programmatically. It does mean that you will almost certainly get banned for doing so.
On the other hand, this behavior is allowed when using AdSense + Doubleclick for publishers (DFP). This documentation should point you in the right direction, and you'd want to call something like this to refresh your ads:
googletag.pubads().refresh();
The following tutorials should give you enough information to figure out how to use AdSense + DFP:
If you are adamant about automatically refreshing ads without DFP, you could do the following wrapped in a timer function:
document.getElementById('FrameID').contentWindow.location.reload(true);
Be advised: This will get you banned from AdSense if you are not using the service through DFP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With