Click here to Skip to main content
15,943,419 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In mobile view sometimes blank space displaying instead of google ads. I want to replace google ad with another image if there is no ad from google. So How do I determine that there is ad from google or not? and if I will replace google ad with image then will it violate the policy of google adsense?

Thanks in advance.

What I have tried:

I tried googling but did not get exact answer.
Updated 3-Sep-19 9:08am

1 solution

So How do I determine that there is ad from google or not?
There is a setting in AdSense that lets you automatically hide the ad container if no ad is loaded.

I would recommend not messing around with the ad containers, as they mostly go against their terms or service and policies.

But again, you need to check how to do that from AdSense, and avoid tampering the scripts.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900