How to add Lazy Load Google Adsense

How to add Lazy Load Google Adsense ads for Blog

How to add Lazy Load Google Adsense ads for Blog. Surely those of you who are using Google Adsense to serve ads on Blogs to make money know one thing when you attach Google Adsense ads, Blog it makes your Blog page load slow if not very slow. In this article, I will share with you how to optimize and help your Blog load faster when attaching Google Adsense ads and the way I want to share in this article is to use Lazy Load. So what is Lazy Load first?

What is Lazy Load?

Lazy loading or lazy loading is an optimal technique when making the web, instead of loading the entire web page and rendering it from the beginning, this technique allows to immediately load of the necessary components to display to the user and delays the loading of the web pages. remaining resources until needed.

Advantages of Lazy Loading

  • Improve user experience.
  • Improve website performance.
  • Resource-saving.
  • Increase website review score.

Google also always advises publishers to improve page loading speed. They are always developing more tools and articles to help publishers improve site speed. To improve website speed, Google recommends Lazy Loading to limit images that don’t appear above the fold.

How to add Lazy Load Google Adsense ads for Blog

How to add Lazy Load Google Adsense

How to add Lazy Load Google Adsense

Next comes the problem I will guide or share with you to add Lazy Load code for Google Adsense to help your blog load faster.

Step 1: You access the HTML editing page of Blogger.

Step 2: Find and remove the Google Adsense script tag, the code has the form:

<script async=’async’ src=’//’><script>

Step 3: Copy and paste the JavaScript below in front of the </body>.

window.addEventListener(“scroll”, function() {
var adsenseCodehay = document.createElement(“script”);
adsenseCodehay.src = “”;
adsenseCodehay.async = true;
adsenseCodehay.setAttribute(‘crossorigin’, ‘anonymous’);
adsenseCodehay.setAttribute(‘data-ad-client’, ‘ca-pub-xxxxxxxxxxxxxxxxx’);
}, true);

Step 4: Replace ca-pub-xxxxxxxxxxxxxxxxxwith your AdSense Publisher ID.

Step 5: Click save and check your Blog.


That’s it, I just shared with you How to add Lazy Load Google Adsense ads for Blog. If you have any problems or errors, you can comment below the article and I will support you!

Click to rate this post!
[Total: 1 Average: 5]
Notify of
0 Góp ý
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x