- This topic has 13 replies, 3 voices, and was last updated 3 years, 12 months ago by David.
-
AuthorPosts
-
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 advance
April 18, 2020 at 8:17 am #1244366LeoStaffCustomer SupportHi 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.
April 18, 2020 at 9:14 am #1244436GianHi 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 SiteThank you
April 18, 2020 at 9:23 am #1244444LeoStaffCustomer SupportCan you copy and paste the code here?
Make sure to highlight the code and click the
code
button.April 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 SupportIs that the code for auto ads?
Can you try adding manual ads using hooks?
April 18, 2020 at 9:39 pm #1244919GianYes, 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 SupportTo add it using Hooks:
1. Appearance > Elements > New > Hook
2. Add yours script
3. Select theWP_Head
hook
4. Set your Display Rules.Thats it.
April 19, 2020 at 8:48 am #1245510GianHi 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 SupportSorry 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 🙂
April 19, 2020 at 9:33 pm #1246070GianHi 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
April 20, 2020 at 2:04 am #1246243DavidStaffCustomer SupportThe 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 #1246789GianOk David, thank you for your help.
April 20, 2020 at 1:02 pm #1247126DavidStaffCustomer SupportNo problems – sorry we couldn’t be of any more help
-
AuthorPosts
- You must be logged in to reply to this topic.