First, a quick refresh.
Lazy loading enables your pages to load faster. How? By loading the elements (images, ads, and iframes) of the pages only when users scroll them into in-view. Lazy loading isn’t new and publishers have been lazy loading images for years. Now, the same technique is being applied to ads on the page to capitalize on the advantages offered by lazy loading.
We have answered several questions including whether you should lazy load ads or not here.
Now, Google itself provides a lazy loading script that you can use along with GPT. Here’s the script. You can modify it based on your site’s unique requirements.