AdSense Update: Improving loading speed with new AdSense code
Recently Adsense team has launched a new Adsense code which will suppose to improve your page loading speed by decreasing the unnecessary resources.
Most Bloggers and site owners complain that the page speed is reduced drastically after the AdSense code implementation. It is very difficult to pass the core web vitals score in the page speed insight tool and in the real-world chrome user experience report.
The New Adsense code is optimized a little bit to improve the loading performance and it will work on both Auto ads and manual ad units.
Should I upgrade my Adsense code now?
Yes, you should upgrade your old AdSense code with the new ones to boost your speed performance.
Now Adsense team has replaced all old codes with the new ones in the Adsense dashboard. so, replace the old codes with the new ones in your theme code.
However, the old codes will still work, if you don't want to manually change all Adsense codes now. But, I strongly recommend changing it as it improves your speed performance and helps in core web vitals score.
If you want to change the Ad code on your website, remember these points
- Update all ad codes on your website and avoid mixing old and new codes for optimal results.
- Your publisher id is the same for all ad codes.
What does the new ad code look like?
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-xxxxxxxxxx" crossorigin="anonymous"</script>ghg
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234" crossorigin="anonymous"</script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-xxxxxxxxxxxxx”
data-ad-slot=“xxxxxxxxx”
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
What's the change in this new code compare to the old code?
- Lazyload Images in Blogger
- Lazyload Youtube Embedded iframes
- Lazyload Google analytics code
- Update to Latest Jquery code
- Fix Avoid chain critical requests.