[Support request] Adsense Auto Ads push down page and leave white space

Home Forums Support Adsense Auto Ads push down page and leave white space

  • This topic has 13 replies, 3 voices, and was last updated 5 months ago by David.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1243774
    Gian

    I have inserted the Adsense Auto Ads (https://support.google.com/adsense/answer/9261805?hl=en-GB#auto_ads) code in the header with the plugin Insert Headers and Footers, but I noticed an issue from mobile devices that push down all the page when a specific type of ad (Anchor: Ads that stick to the edge of the user’s screen and are easily dismissible screenshot https://imgur.com/a/MdhFGEU) is dismissed (screenshot https://imgur.com/a/wSpXTzt).

    I’m not logged into WordPress and I’m visiting my page in incognito mode. Is happening from different browsers such as Chrome and Safari.

    Do you have any idea why and how to fix this?

    Thank you in advance

    #1244366
    Leo
    Staff
    Customer Support

    Hi there,

    Have you checked with the plugin support to see if they’ve seen similar issues?

    Generally speaking, manual ad with hooks elements is the method we usually recommend.

    #1244436
    Gian

    Hi Leo, could you please guide me to insert code between the <head></head> tags of my site with hooks?

    Hook > wp_head
    Execute Shortcodes?
    Execute PHP?
    Priority?
    Location > Entire Site

    Thank you

    #1244444
    Leo
    Staff
    Customer Support

    Can you copy and paste the code here?

    Make sure to highlight the code and click the code button.

    #1244456
    Gian

    <script data-ad-client="ca-pub-XXXXXXXXXXXX" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

    #1244656
    Leo
    Staff
    Customer Support

    Is that the code for auto ads?

    Can you try adding manual ads using hooks?

    #1244919
    Gian

    Yes, is the code for auto ads which is the one I’m having issues with.

    I don’t have any problem with manual ads, that’s why I’d like to try the auto ads with hooks if you could guide me.

    Thank you!

    #1245052
    David
    Staff
    Customer Support

    To add it using Hooks:

    1. Appearance > Elements > New > Hook
    2. Add yours script
    3. Select the WP_Head hook
    4. Set your Display Rules.

    Thats it.

    #1245510
    Gian

    Hi David, thank you for your help.

    I’ve removed the code from the plugin Insert Headers and Footers and added it with Hooks, but I have the same issue as mentioned in my first post.

    Do you have any idea why it’s happening? Could be some conflict between GeneratePress and that specific code?

    Thank you in advance for your help!

    #1245923
    Leo
    Staff
    Customer Support

    Sorry are you still using auto ads?

    I believe that’s the issue.

    If you try manual ads instead, then you can choose the desired hook to make show at the desired locations:
    https://docs.generatepress.com/article/hooks-visual-guide/

    Let me know if this helps 🙂

    #1246070
    Gian

    Hi Leo,

    Manual Ads and Auto Ads are 2 different things.

    Manual Ads are fixed size or responsive and you can put manually in different location of your articles and pages, while Auto Ads are placed by Google automatically in order to optimize earnings, that’s why I’d like to try them but I believe there’s an issue with your theme.

    From the Google Adsense dashboard I can disable ads that I don’t want, but I decided to ask in the support forum if you could figure out what is the problem caused by this specific ad called vignette https://imgur.com/a/MdhFGEU when is dismissed by users, as you can see from here https://imgur.com/a/wSpXTzt the page is pushed down and there’s a white space which shouldn’t be there.

    I hope my question is clear, and I’d appreciate if you could look into this issue.

    Thank you in advance.

    Gianluca

    #1246243
    David
    Staff
    Customer Support

    The AutoAd script is adding inline CSS to the <body> element of your site.
    This adds Top Padding to provide the space for the advert.

    Unfortunately what it doesn’t do is remove that styling when the advert is hidden or ‘change’ any element attributes we could use to overwrite the styles.

    You may want to raise it with Adsense.

    #1246789
    Gian

    Ok David, thank you for your help.

    #1247126
    David
    Staff
    Customer Support

    No problems – sorry we couldn’t be of any more help

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.