increase website speed by loading Google ads after page loads

How to load Google ads after page load to increase website speed

After Google uses site load times as search ranking factor your website should load fast with AdSense ads to rank better in Google search engine.

As user perspective experience if you improve your website loading speed then it will help sites rank better for search.

I use Google AdSense to make money online in many websites. Due to Google AdSense my website page speed is very slow as compared to other normal website.

You have website and wan to earn money with your website but you have not created your Google AdSense account then you can refer following link.

How to create Google Adsense Account

To overcome website page speed i have tried many ways by placing Google ads on my blog and website. Every time i not get any luck for increasing website speed.

After some research over the internet I found some solutions that can increase website speed. I though i need to make one article and need to share with all my followers who has same website speed issue due Google AdSense.

Many people asked on forum that How we can load Google AdSense dynamically to increase website speed?

My answer is yes. You can make changing to your website and can increase up to 15% loading speed of your website.

There are different points that can help increase website speed with Google ads.

Step 1: Replace your old Ads

Google has replaced AdSense code in 2019, so you have still old code then you must replace that AdSense code with new code. All of you know very well that you can find new AdSense code after logging in to the Google AdSense account.

Step2: Use Asynchronous Code

Google provide two option to place AdSense code in website or blog

  • Synchronous Code
  • Asynchronous Code

If you are not technology person and don’t know about the Synchronous and Asynchronous then it’s my habit to give you that knowledge.

Synchronous basically means that you can only execute one thing at a time. In short other process wait until previous process is completed.

Asynchronous means that you can execute multiple things at a time and you don’t have to finish executing the current thing in order to move on to next one.

You need to check script tag must contain the “async” word.

You can compare Synchronous AdSense code and Asynchronous AdSense code at the following code.

Synchronous Google AdSense code

This code will load Google ads synchronously while loading your web page in browser.

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
                <!-- Responsive Ads -->
                <ins class="adsbygoogle"
                     style="display:block"
                     data-ad-client="ca-pub-1124138407080000"
                     data-ad-slot="7044952330"
                     data-ad-format="auto"></ins>
                <script>
                (adsbygoogle = window.adsbygoogle || []).push({});
                </script>

Asynchronous AdSense code

This code will load Google ads asynchronously while loading your web page in browser.

<script type="text/javascript">
    google_ad_client = "ca-pub-1124138407080000";
    google_ad_slot = "4975329139";
    google_ad_width = 468;
    google_ad_height = 60;
</script>
<!-- 468x60 only text -->
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

I think you can understand Google totally changed the AdSense code after 2019. I prefer that you must replace your old code with new Google AdSense code.

If you website load Google AdSense asynchronous code then you will see little bit improvement in your website speed.

Actually I can’t say above method but i have to give some guidance. I some case JavaScript method will not work if you were not able to change directly in code.

You can better understand and will be prepare for the further implementation of following JavaScript method for placing some delay to load Google ads after page load of your website.

If you are not technical person needs help then surely contact me I will help you to increase your website page speed by placing AdSense code at properly in your site.

This method will work just like load Google AdSense dynamically in your website.

Method 3: Use JavaScript Delay Method

To apply this method for placing delay in Google AdSense code execution you will required to some change in your existing AdSense code.

You will need to remove just script link from all your ads and place at once before </head> section of the page.

Your AdSense code will look like the following:

<ins class="adsbygoogle"
                     style="display:block;height:100px"
                     data-ad-client="ca-pub-112413840708000"
                     data-ad-slot="8645369524"
                      data-full-width-responsive="true">
</ins>

After that you need to add the following code at the end of page just before </body>

<script>
function initialize_AdsenseCode()
{
	(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
}
setTimeout(function() {initialize_AdsenseCode();},200);
</script>

Function initialize_AdsenseCode will be executed after some delay of 100 millisecond after your page load successfully.

Note: You will need to add the following line in that initialize_AdsenseCode function with multiply by number of ads.

(adsbygoogle = window.adsbygoogle || []).push({});

For example if you want to put 2 ads in your page then you will required to add that line only two times in code.

Most of blogger use Google AdSense and place so many ads in one page it will decrease the Website page speed. I want to know that website speed much important to increase SEO score and Google Search Engine Rank.

If you are using WordPress plugin for better Google ads placement then might be this tricks will not work.

In last if your website not eligible for Google AdSense or not approved by Google yet then you should try following link for making money from other ads publisher site.

Best Google Alternative Ad publisher Sites

If you have Google AdSense account but that not verified yet then you can visit my previous article How to Verify Address PIN by Google AdSense?

Some people uses load Google ads with Ajax method but i want to say this will not work for normal AdSense and you will require Google Tag Manager.

If i am wrong then you can suggest your opinion related to this article and we can improve this article and help people who use Google AdSense code for earning money online.

Leave a Reply

Your email address will not be published. Required fields are marked *