We have a couple of cases where Google Ads are not showing when the default list of delayed scripts is used.
Removing adsbygoogle resolves it.
Ticket: https://secure.helpscout.net/conversation/1278600269/193807?folderId=377611#thread-3670406924
I did not see a console error in this case.
The delayed scripts are not getting replaced with the real ones on interaction. This is how it looks in the Inspector:
https://jmp.sh/AWEwBri
Possible case: https://secure.helpscout.net/conversation/1278337450/193706/
Backlog Grooming (for WP Media dev team use only)
Not sure if it's related, customer reported that revenue went down, but everything seems okay now - https://secure.helpscout.net/conversation/1275071766/192634/
According to this discussion in Slack, @engahmeds3ed mentioned that the Google Ads script is using DOMContentLoaded.
The way our feature is implemented, the execution of such scripts should not be delayed.
This issue can be related to the fact our inline scripts to preload / delay JS files were included into the concatenated file. On the two cases we had, one of them has been confirmed related to this problem. The concatenated file had a JS error which stop our features to work properly.
If the issue was really related to the DOMContentLoaded, I suppose we should have more tickets about Google Ads.
A PR is done to auto-exclude our inline scripts:
https://github.com/wp-media/wp-rocket/pull/3095
I can confirm that I am also facing such a revenue drop and the ads are not visible all the time. Sometimes it works sometimes doesn't. A strange behavior. Also, on some websites, the ads are only visible when the mouse is hovering the "Content" div. For example, if there is blank space on the outer div, the ads are not loading until the mouse is inside the div making the ads appear late considerably affecting the viewability of ads.
I want to add, that I faced this issue until I changed the rule of adsbygoogle to adsbygoogle.js so only the main JS file is deferred, and the inline script remains unchanged.
~Possible case: https://secure.helpscout.net/conversation/1284650572/195485/~
Ads are showing.
Side note: Customer reported they had a fraudulent clicks campaign going on, and delaying Adsense actually helped skip clicks from bots :)
related: https://secure.helpscout.net/conversation/1301839373/200133/
replacing adsbygoogle to adsbygoogle.js solves the issue
related: https://secure.helpscout.net/conversation/1298929177/199275?folderId=3864740
only ads added by _Advanced Ads Pro plugin_ had this issue.
replacing adsbygoogle to adsbygoogle.js solves the issue.
We don't have many more reports about this and with the change in default from adsbygoogle to adsbygoogle.js as per https://github.com/wp-media/wp-rocket/issues/3119 it should cover cases reported here.
Going to close this for now. Please feel free to reopen if that is not the case.
Most helpful comment
I want to add, that I faced this issue until I changed the rule of adsbygoogle to adsbygoogle.js so only the main JS file is deferred, and the inline script remains unchanged.