Mobile app version of vmapp.org
Login or Join
Angela700

: Adsense RPM is frozen upon advanced screen detection. Why? This is unusual. This code causes me to receive pennies per RPM for my website: <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></scr

@Angela700

Posted in: #FraudDetection #GoogleAdsense #GoogleAdsensePolicies #Javascript #ScreenSize

This is unusual. This code causes me to receive pennies per RPM for my website:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"></ins>
<script>
(adsbygoogle=window.adsbygoogle||[]).push({params:{data_override_format:"true",data_page_url:<url where ad is located>,google_ad_slot:"###",google_ad_client:"###",google_ad_width:<width determined by php>,google_ad_height:<height determined by php>}});
</script>


This code however causes me to receive far less RPM:

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"></ins>
<script>
if (screen.width > <width determined by php - 1> || window.clientWidth > <width determined by php - 1> || window.innerWidth > <width determined by php - 1>){
(adsbygoogle=window.adsbygoogle||[]).push({params:{data_override_format:"true",data_page_url:<url where ad is located>,google_ad_slot:"###",google_ad_client:"###",google_ad_width:<width determined by php>,google_ad_height:<height determined by php>}});
}
</script>


Yet, when I tested both scripts on my computer, they executed with no problem. I even tested it on my mobile device and had no problem. The second code, I applied to the site for less than 24 hours. The first code I reapplied to the site after the second code and within 20 minutes from the switch, I immediately noticed an increase in RPM.

The reason why I did this is two-fold. One, to try to prevent bots from screwing around with adsense on my site, and Two, to eliminate scrolling on smaller devices just because of an ad.

The ad width and height is determined by a PHP script and is dependent on the page being loaded.

So my question is, Why should I suffer in earnings even tho I'm following adsense rules even more by clearly protecting artificial RPM inflation from happening? And if anyone knows a better script that the adsense ROBOT approves of that I can use to prevent random bots from clicking ads on my site, let me know.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela700

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley277

Google has published their recommendations on how to implement responsive units along with a code sample on how to hide the ad unit for certain screen sizes. You can view it here: support.google.com/adsense/answer/3543893?hl=en&ref_topic=1307438 (Click on the heading titled Hiding an ad unit)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme