- This topic has 13 replies, 3 voices, and was last updated 12 months ago by David.
April 17, 2020 at 10:35 pm #1243774Gian
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 advanceApril 18, 2020 at 8:17 am #1244366LeoStaffCustomer SupportApril 18, 2020 at 9:14 am #1244436Gian
Hi Leo, could you please guide me to insert code between the <head></head> tags of my site with hooks?
Hook > wp_head
Location > Entire Site
Thank youApril 18, 2020 at 9:23 am #1244444LeoStaffCustomer SupportApril 18, 2020 at 9:33 am #1244456Gian
<script data-ad-client="ca-pub-XXXXXXXXXXXX" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>April 18, 2020 at 1:34 pm #1244656LeoStaffCustomer SupportApril 18, 2020 at 9:39 pm #1244919Gian
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!April 19, 2020 at 2:57 am #1245052DavidStaffCustomer SupportApril 19, 2020 at 8:48 am #1245510Gian
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!April 19, 2020 at 4:35 pm #1245923LeoStaffCustomer 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:
Let me know if this helps 🙂April 19, 2020 at 9:33 pm #1246070Gian
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.
GianlucaApril 20, 2020 at 2:04 am #1246243DavidStaffCustomer 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.April 20, 2020 at 7:57 am #1246789Gian
Ok David, thank you for your help.April 20, 2020 at 1:02 pm #1247126
- You must be logged in to reply to this topic.