Google Adsense is a product of Google. For the purpose of loading Adsense ads after the page fully loaded, you can use the following script to load it.
The ads of Google Adsense are slow your website speed. If your website takes a lot of time, then it's a problem of adsense js code. You have to do some customization with javascript. You need to get Javascript help to perform custom functions.
You have created a website on any platform; Solution of this javascript will help you for all platforms.
After inserting the code from Google Adsense, if your website is taking a very long time to load the entire page then you have to optimize it via js function.
first of you have to add this code in <body> tag .
<body onLoad="page_begin();">
Now remove the below adsense code from all ads . (This code is place only in the head=>Under the head section )
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script>
Also remove below adsense code from the all ads.(This will define in a java script function)
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Paste this code under the head tag . (before closing the head tag)
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">
</script>
To inialise the whole page you have to create a function initialize_page() .
function page_begin()
{
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the first adsense
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the second
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the third
}
If you want to five or more adsense code in one page then you have to increase code this way .
function page_begin()
{
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the first adsense
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the second
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the third
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the fourth
(adsbygoogle = window.adsbygoogle || []).push({});//this is for the fifth
}
Now when your page is fully loaded then all google adsense ads will load . Note: - This is a tested method. Read the complete solution and then apply. It will help you.