Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refreshing google adsense on an AJAX page

I know that directly refreshing the ads is against the TOS of Google adsense but I am wondering if it would be possible to use java script JUST to refresh the ads after 30 seconds or so on an AJAX themed website?

Currently if I display ads on my page they will disappear because of Google's 3 ads per page limit and because I am using ajax basically to keep my page from refreshing ever I am going to assume that it's not going to be possible to display Google adsense ads on my website?

like image 782
Placeholder Avatar asked Dec 15 '14 07:12

Placeholder


People also ask

How to refresh an ad in AdSense?

I suggest you to check Google Adsense documentation if you are allowed to refresh the ads. If you examine the DOM of page with Adsense ads on it, you'll see an iframe. You can find the iframe and then reload it with You may have to tweak things to get this to work exactly right.

Is it safe to auto refresh a non-Google Ad?

Refresh Google ad to a non-Google ad However, if the case is user-initiated, it is safe to: Refresh a non-Google ad to a Google ad And depending on your chosen ad network, it is generally fine to auto-refresh a non-Google ad to another non-Google ad.

Can I auto-refresh to and from Google Ads in a single URL?

And depending on your chosen ad network, it is generally fine to auto-refresh a non-Google ad to another non-Google ad. Bottom-line: Unless user-specified, publishers are not allowed to auto-refresh to and from Google ads, in a single URL.

How to refresh a webpage every 60 seconds using jQuery?

If the webpage is using jQuery, just implement the code bellow: And, if you want to refresh it each 60 seconds, there is a sample you can try: var ad_refresher = setInterval (function () { $ (".adsbygoogle").each (function (i,e) { $ (e).html ($ (e).html ()) }); }, 60000); If the code above was implemented, stop the refresh behaviour with:


2 Answers

Refreshing your AdSense advertisements automatically isn't allowed. I understand that you only intend to refresh the ad in response to user action, but it still isn't allowed, even though it should be!

Remember, the reason why you want to update the advertisements is so that you can show new ones. Displaying an advertisement is called an "impression." When you use code to refresh the ads, you are automatically generating ad impressions.

AdSense Program Policies state (emphasis mine):

See full answer Refresh a Div that has a Google ad inside it

like image 53
Adeel Mughal Avatar answered Nov 08 '22 19:11

Adeel Mughal


See this post from Google. It has the code in to refresh the ad after an interval. Not quite as good as after the Ajax refresh but I guess if you are doing dynamic paging or something like that then the ad will refresh periodically at least.

https://support.google.com/dfp_sb/answer/3058726?hl=en&ref_topic=4409240

like image 42
Rob Sedgwick Avatar answered Nov 08 '22 18:11

Rob Sedgwick