What is Google AdSense?
Google AdSense is a service that enables publishers to display ads on their websites. The ads can be text, image or video and they are placed in such a way as to appear natural and un-intrusive.
Publishers receive payment for each click or impression of the ad, depending on the type of ad agreement they have with Google. Publishers can also choose where they want to place the ads on their site and customize the size of the ad box.
AdSense Not Showing On My WordPress Site
Few days ago, a client asked me for help in a problem related to AdSense ads and WordPress. The ads weren’t generated at all on the WordPress site, built with Elementor. My client first thought, somewhat induced by an AdSense representative, was that the source of the problem is WP Rocket. I checked and the problem wasn’t related to WP Rocket. I also checked if there is any conflict between the AdSense code and Elementor and, again, no problem. The little issue, if I can call it in this way, was the site wasn’t fully approved in the AdSense Program (Yes, you have to wait a few days to get the native ads configured for your site).
If You Have Issues Running AdSense On Your WordPress Site, Here Are Some Things To Check:
1. Site is not approved yet by Google AdSense
If your site (*& AdSense account) is brand new, you should wait between 1 and 5 days to be verified by the AdSense Team. Within this time, you may not see the ads (you will see a blank space). If the issue is still there, contact AdSense Team.
Also, try to check the site/page from another browser(s). Maybe a cache tempo issue generate this error.
2. Use HTML mode instead of Visual mode
Make sure you insert the AdSense code in the HTML mode and not in the Visual mode: This little detail may cause problems to your AdSense code, and not only. As a general rule, each and every code should run in HTML and not in Visual.
3. WordPress Speed Up Plugins may affect the Adsense
It is a known fact that some plugins may be in conflict with the AdSense script. WP Rocket, for example, may be in conflict with Adsense.
To solve this, you have to make sure you don’t delaying the Adsense script. To check and solve the issue, go to:
Admin Dashboard -> Settings -> WP Rocket -> File Optimization -> Scroll down to “Delay JavaScript execution” and find the line(s) related to the Adsense script (“adsbygoogle“, adsbygoogle.js“, “pagead2.googlesyndication.com” and so on). Once you find anything related to this, delete the line and purge the cache.
4. AdSense Problem With Elementor
First of all, does AdSense work with Elementor? Short response: Yes.
Second, may AdSense not working with Elementor, from different reasons? Short response: Yes.
Even the lines above are similar, we have to pay attention to the second point: “AdSense not working with Elementor”. A known reason for that is Elementor block settings may be in conflict with the AdSense script.
A. More exactly, the code below may generate AdSense errors:
elementor-widget-container { height: auto !important; }
To solve this, you have to change the code above with the one below:
.elementor-widget-container { height: auto; }
With the code above, you will allow the element (in this case, the AdSense script) to run with its own width and height, instead of using the Elementor settings and crashing it or generating errors.
To insert this code without too many hassle, install custom css/js plugin and configure from there.
B. Another thing which may solve the issue is to uncheck/switch off the “Stretch section” setting from the page.
Conclusion
Google AdSense is a powerful tool for publishers. It provides them with an opportunity to monetize their content and generate revenue. However, there are some best practices that you should follow if you want your implementation to be successful.
First of all, make sure that your website is compliant with Google’s terms of service. The most common violations are the use of misleading ads, pop-ups or pop-unders, and deceptive ads that trick users into clicking on them.
Next, do not place too many ads on the same page as it might annoy your readers and cause them to leave the page or click on an ad accidentally.
Finally, make sure that you have a high-quality website with original content in order to increase your chances of success.
That’s it! If you apply one of the tweaks above, you may solve the issue yourself.