{"id":1534,"date":"2016-09-28T07:09:51","date_gmt":"2016-09-28T06:09:51","guid":{"rendered":"https:\/\/simonday.com\/web-design-news\/?p=1534"},"modified":"2016-09-28T17:10:47","modified_gmt":"2016-09-28T16:10:47","slug":"adsense-warning-action-required-to-comply-with-adsense-program-policies","status":"publish","type":"post","link":"https:\/\/simonday.com\/news\/adsense-warning-action-required-to-comply-with-adsense-program-policies\/","title":{"rendered":"Adsense warning: Action required to comply with AdSense program policies"},"content":{"rendered":"<p>I&#8217;ve had Google ads on <a href=\"https:\/\/torbayfishing.com\/\" target=\"_blank\">Torbay Fishing<\/a> for around 12 years now. This week I received a warning from them, the first one ever. This is what happened and how I fixed it&#8230;<!--more--><\/p>\n<h3>TLDR Brief Summary<\/h3>\n<p>The email from Google Adsense stated:<\/p>\n<p>&#8220;<em>Publishers may not implement Google ads in a manner that disguises the ads in any way. In order to maintain a good user experience, it is important for publishers to clearly distinguish Google ads from site content. This includes, but is not limited to: site layouts in which the ads push content below the fold on mobile devices; placing 300&#215;250 or larger ad units above the fold on a mobile optimized site<\/em>.&#8221;<\/p>\n<h3>TLDR Brief solution<\/h3>\n<p>The responsive ads were generating ads that were too big in height for\u00a0<a href=\"https:\/\/support.google.com\/adsense\/answer\/1346295?hl=en&amp;vid=1-635768021857657759-3299439999#Difficult_to_distinguish_ads_and_content\" target=\"_blank\">Google&#8217;s own Adsense policy<\/a>. All the affected ads at the top of the page are wrapped in a container div with the class &#8220;top20&#8221;<\/p>\n<p>I had to force the ads to not go over set sizes by adding this to my CSS file:<\/p>\n<p>@media (max-width: 400px) { .top20 { width:100%;height:100px; } }<br \/>\n@media (min-width:500px) { .top20 { width: 100%; height: auto; } }<\/p>\n<h3>In-depth explanation<\/h3>\n<p>Google, by default, have the ad creation code set to &#8220;Responsive&#8221;. If your website is responsive then it&#8217;s the go-to code to use. The problem is in some circumstances it will break its own rules.<\/p>\n<p>Google recommend the following for mobile ads:<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1546\" src=\"https:\/\/simonday.com\/web-design-news\/wp-content\/uploads\/2016\/09\/google-boxes.gif\" alt=\"Google placements.\" width=\"700\" height=\"659\" \/><\/p>\n<p>So far so good. Look at the middle suggestion and then look at how I placed the advert on the page&#8230;<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1548\" src=\"https:\/\/simonday.com\/web-design-news\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-26-at-16.51.03.png\" alt=\"My placement.\" width=\"400\" height=\"820\" srcset=\"https:\/\/simonday.com\/news\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-26-at-16.51.03.png 400w, https:\/\/simonday.com\/news\/wp-content\/uploads\/2016\/09\/Screen-Shot-2016-09-26-at-16.51.03-146x300.png 146w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p style=\"text-align: left;\">You&#8217;ll see the content and ad <strong>exactly<\/strong> match the suggestion so I&#8217;m all set right? Well actually, no, it&#8217;s wrong and I was about to get banned because of it!<\/p>\n<p style=\"text-align: left;\">Google decree that NO ad with a height of 250px or higher can be displayed in the initial area on mobiles. The ad the responsive code produced was a height of 250px so I got the warning. In their own example the middle option actually breaks their own rules.<\/p>\n<p style=\"text-align: left;\">Even though you can barely see the ad&#8230; because it CAN be\u00a0partially be seen on a mobile, I&#8217;ve broken the rules without even knowing it.<\/p>\n<p style=\"text-align: left;\">What I had to do was create a couple of lines of CSS (shown at the top of this page) to FORCE the responsive ads to not break their own rules. By telling it that it <strong>can&#8217;t<\/strong> display ads that big I stopped the issue.<\/p>\n<p style=\"text-align: left;\">It took a lot of digging around several websites to figure out what the issue was and how to resolve it. I hope this helps you by having the answer in one place.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve had Google ads on Torbay Fishing for around 12 years now. This week I received a warning from them, the first one ever. This is what happened and how I fixed it&#8230;<\/p>\n","protected":false},"author":2,"featured_media":304,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[137],"class_list":["post-1534","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-help-guide","tag-adsense"],"_links":{"self":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts\/1534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/comments?post=1534"}],"version-history":[{"count":21,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts\/1534\/revisions"}],"predecessor-version":[{"id":1560,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/posts\/1534\/revisions\/1560"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/media\/304"}],"wp:attachment":[{"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/media?parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/categories?post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simonday.com\/news\/wp-json\/wp\/v2\/tags?post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}