Ads not loading in mobile devices
-
Frank,
Hope you’re doing well.
On this client site, my ads aren’t loading in mobile when Autoptimize is on. I’ve turned of ASYNC, as well.
Can you check my settings and let me know what I need to leave on/off.Tony
The page I need help with: [log in to see the link]
-
First and foremost try to identify what is breaking ads by just disabling CSS or JS or HTML or Image optimization (incl. lazyload). Based on that we can see what the next steps need to be ??
frank
Okay, so I ran through all the scenarios disabling each optimization (JavaScript, CSS, HTML) and then clearing the Cloudflare Cache, the Autoptimize Cache, and the WP Engine cache after each disabled checkbox and the sidebar ads are not appearing until you disable Autoptimize altogether.
I’ve notified Advanced Ads to see if they know anything about any conflicts with Autoptimize. I just left them a long note in their support forum about it.
So, what’s the next step?
I can’t leave Autoptimize active right now because we’re on a live site, so I have to disable it so the ads will show in mobile until I can get feedback from you and test again tomorrow night EST.Here’s the JS console view when turned on.
the 2 syntax-errors are from a browser add-on, so those are not relevant.
“missing data from PHP” is from something in the admin bar, so likely not related.
961.js’s output is not an error, but that one is relevant, because that’s the advancedads JS that seems to be saying that ads are … not needed? to be checked with them really.
re. AO settings; you are sure _everything_ is off, including image opt., lazyload, all the settings on the extra tab?
but do test if the problem with the ads also happens in anonymous mode, so not logged in (which you were given the error from wpnotes in the admin bar?
Okay, I didn’t uncheck those options. I just unchecked the main JavaScript, CSS, and HTML options. I will go for another round tonight and see what happenes. I’ll also disable the Cloudflare and WP Engine caches completely so I don’t have to keep flushing them every time I make a chang and I’ll report back.
I’ll also show the AdvancedAds folks the screenshot and push that js issue over to them to see what they think.Framk,
So, I turned off EVERYTHING, lol.
Here’s the thing, when I turned off HTML, CSS, and JavaScript, the ads appeared.
Today, it looks like the cache needed to be cleared, which I did, and the ads reappeared. Then, I turned off Lazy Load, emoticons, and Google Fonts setting those back to their basic default settings.
If you want to take a look behind the scenes again, that would be helpful.
What’s really frustrating is that when you have all this caching enabled, it’s very hard to know what you did will affect the ads from being displayed.
What I’m thinking now is that Lazy Load may not be seeing that the full page loads and is thus preventing the ads from loading. However, there are other images on the page that do load. So, my premise is that something is affecting Advanced Ads from loading when Lazy Load is on, but I can’t be 100% sure because of the caching and waiting to see if the Ads are going to disappear again.Okay, confirmed it’s Lazy Load, at least on mobile.
= Turned on Lazy Load
– Cleared all caches (AO, Cloudflare, WP Engine)
– Mobile ads disappeared, Desktop still present (but couldn’t see in Incognito for desktop but don’t trust that anyway because it may affect the ads loading regardless)
– Turned off Lazy Load
– Cleared all caches again
– Mobile ads reappeared
Now that Lazy Load is off, I turned back on all optimizations and it seems to be stable.
So, the culprit has to be Lazy Load, I think.
I also have ShortPixel enabled, but since the instructions for Short Piexel state to use AO for that feature, I’m sure that’s not an issue.some great systematic troubleshooting there Tony, good job! ??
Thanks! But now I can’t use Lazy Load, right? What do I do now? Why won’t Lazy Load work with the Ads plugin? Can I exclude the ads plugin from Lazy Loading? I need it for all the other images, no?
-
This reply was modified 1 year ago by
Tony Zeoli.
guess would be best to could check with the ads plugin people I guess, but AO does have an exclusion field where you can add images (or any other attribute in the <img tag) that should not be lazyloaded, so playing with that might help?
Ah, okay…I’ll check with the Advanced Ads crew and tell them what’s goig on and see how we can fix that and/or exclude specific images. But we’d have to constantly manually do that every time a new ad is added to the system. Kind of a pain, but I get it.
well, you can exclude by class attribute of the
<img
tag (or any other attribute) as well ??Well, looks like I spoke to soon. Woke up this morning and the ads were no longer there. Turned off JS optimization, cleared cache only the AO cache, and the ads returned. CSS and HTML are still active. Lazy Load is off.
so did you get feedback from advancedads about the console output? because that to me is the only tangible lead here?
Not yet. I’m waiting to here back from them. They do have a published page on lazy loading and they offer their own lazy load feature for their PRO version. But now, it’s not lazy load…it’s got to be some js. This is one of those things where they point the finger at you and you point the finger back at them and instead of you both getting in touch about it, I have to be the middle man and being the messenger is probably not going to solve the issue. I mean, I certainly understand why I’m in the middle, but Advanced Ads is pretty popular so it seems to me there should be some communication between you both so that they know what you need and you know what they’re doing. You can jump in on the thread over there if you feel so inclined. Or, we’ll just have to play this back and forth and I’ll be stuck in the middle.
-
This reply was modified 1 year ago by
- The topic ‘Ads not loading in mobile devices’ is closed to new replies.