Lazy Load AdSense plugin allows you to place your Google AdSense script without affecting your website page speed.
Lazy Load AdSense plugin is a simple and lightweight plugin that allows you to place your Google AdSense script without affecting your website page speed.
Go to https://wordpress.org/plugins/lazy-load-adsense/ to download our plugin and install it to your WordPress System.
lazy-load-adsense.zip
to the /wp-content/plugins/
directory. And extract it zip fileYes, this plugin is 100% free.
If there is no user activity, we will delay the AdSense script for 5 seconds. If the script detects the user scrolling or any mouse activity, the script will be placed immediately.
If you are using traditional AdSense plugin to install your AdSense script or place the AdSense script directly to your website. You may notice a sharp drop in your WordPress site page speed score especially for Core Web Vitals.
In this plugin, we use a combination technique of both delayed loading and lazy load of the Google AdSense script. When you use our plugin to place Google AdSense script, it will not affect your page speed score.
Technically, this plugin doesn’t speed up your website. If your website has a score of 80 (Core Web Vitals) before placing the AdSense script, after using our plugin. The score will remain the same (80).
But if you place the code directly copied from official website without using this plugin. You may notice, your website core web vitals score might drop from 80 to 50 or even lower.
Yes, we support both manual ads and auto ads placement.
Imagine you want to create a display ads on your website.
1. Log into your “AdSense account” -> “Ads” from menu -> “By Ad Unit” -> Create new ad unit “display ads”.
2. Once u created the display ad. From your “existing ad unit”, click on a button like “< >” to get the manual ad code.
3. Then go to the page/block template(block theme). Create a custom HTML code block, and paste the code.
4. Now you need to remove this line of code <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=YOUR_ADSEBSE_ID" crossorigin="anonymous"></script>
. Then, save the page/block template.
5. No worries the ads will works because our plugin already lazy load the adsbygoogle.js. If you don’t remove the adsbygoogle.js, your website performance will still degrade (core web vitals).
To make sure u understand. Here is the example of before you remove the code in step 4.
Incorrect code example (Before step 4)<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=YOUR_ADSEBSE_ID" crossorigin="anonymous"></script>
<!-- Your Custom Display Ads Name -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="YOUR_ADSENSE_ID"
data-ad-slot="YOUR_AD_ID"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Correct code example (After step 4)<!-- Your Custom Display Ads Name -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="YOUR_ADSENSE_ID"
data-ad-slot="YOUR_AD_ID"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Note: If you placing multiple manual ads, always remove the adsbygoogle.js
script.
Our plugin does not have settings to place ads for specific post types because we want to keep our plugin simple and lightweight.
But if you still need to place ads for specific post type only. You can either use manual ads or you can use Plugin Load Filter. (Disclaimer: We are not affiliated with them)
If you have questions about the plugin, please use the support tab of this page. If you need help other than this plugin, please visit our forum at Jorcus.com. There is a dedicated forum for WordPress topic.