XF 2.2 Google Adsense anchor ads cover guest cookie notice

bzcomputers

Well-known member
Google Adsense anchor ads when placed at the bottom of the screen completely cover the Xenforo cookie notice. The bottom anchor ad position cannot be adjusted nor can the ad be delayed. They are automatically positioned by Google through injected javascript and css outside the control of the admin. They are positioned with a css z-index of 2147483647 (the highest integer value in CSS) meaning nothing can easily be positioned over them.

These anchor ads are currently some of the highest paying ads through Adsense and are becoming more popular by the day.

It would be nice if XenForo offered a couple different positioning options for the cookie notice, like an option for an overlay.

----------------
Edit: Anchor ads also visually block the thread/post moderation input that is also anchored at the screen bottom. Although this is not as big an issue since it is an admin/mod function only and the admin should know how to minimize the ad to access the control (if they're familiar with it previously). Any bottom screen anchored items will be an issue of some degree when anchor ads are active on a XenForo site.
 
Last edited:
I found a work around...

Add this to extra.less template:

CSS:
/* Adjust Adsense Anchor Ads To Display Behind XenForo Bottom Anchored Items BEGIN */
ins.adsbygoogle.adsbygoogle-noablate {
    z-index: 799 !important;
}
/* Adjust Adsense Anchor Ads To Display Behind XenForo Bottom Anchored Items END */

This adjusts the z-index of all Adsense Auto Ads, including the anchor ad position. This places the anchor ad behind the XenForo .u-bottomFixer set at a z-index of 800.
 
I found a work around...

Add this to extra.less template:

CSS:
/* Adjust Adsense Anchor Ads To Display Behind XenForo Bottom Anchored Items BEGIN */
ins.adsbygoogle.adsbygoogle-noablate {
    z-index: 799 !important;
}
/* Adjust Adsense Anchor Ads To Display Behind XenForo Bottom Anchored Items END */

This adjusts the z-index of all Adsense Auto Ads, including the anchor ad position. This places the anchor ad behind the XenForo .u-bottomFixer set at a z-index of 800.
FWIW, it's most definitely an AdSense violation to place any part of your website over AdSense ads. Even if you didn't personally do it, the responsibility is on you, as the site owner to adhere to the AdSense terms/conditions. I understand the intent isn't for some malicious reason, but as far as Google is concerned you are presenting ad impressions that may not be fully viewed by end users.

If you want to stay within AdSense terms, instead of altering AdSense ad placement with CSS, consider altering the position of the cookie notice with CSS (move it somewhere else).
 
FWIW, it's most definitely an AdSense violation to place any part of your website over AdSense ads. Even if you didn't personally do it, the responsibility is on you, as the site owner to adhere to the AdSense terms/conditions. I understand the intent isn't for some malicious reason, but as far as Google is concerned you are presenting ad impressions that may not be fully viewed by end users.

If you want to stay within AdSense terms, instead of altering AdSense ad placement with CSS, consider altering the position of the cookie notice with CSS (move it somewhere else).

For reasons discussed in the thread AdSense blocking scroll to top/bottom on desktop, I decided to simply disable the anchor ads on desktop (and leave them on mobile, where they stick to the top).

How to do that:

Ad Settings -> Overlay formats -> "Turn off anchor ads on screens wider than 1000px, like desktop" (checked)

Relja
 
I just checked my AdSense account after seeing this and I did not see the setting you mentioned, but I was able to see the auto ad settings for each of my sites. I went to:

Ads (left/main menu) > Edit (pencil icon next to site in right pane where auto ads are active) > Excluded areas (right hand menu) > scroll down to bottom of image preview in left pane, click blue bar just above GPDR notice (the one that expands over the gpdr notice) to disable it > Click left arrow button in right pane by Excluded Areas heading > Click Apply To Site button at bottom of the right pane and save your change

Repeat from step 2 for any other XF sites you own as necessary.

Doing this in either mobile or desktop view also carries over to the other view.
 
Back
Top Bottom