WordPress and Adsense Asynchronous Code – 2 Minute Guide

by Dr. Satish Chandra Satyarthi  - April 9, 2019

Wordpress and Adsense asynchronous codeGoogle Adsense Asynchronous Ad code is just better than the old Synchronous code. There are two major benefits of implementing the new Google Adsense Asynchronous Ad code into your WordPress site. 1. Asynchronous code doesn’t affect the loading of other elements of you page. Other parts of your site will open even if the Google ad is taking time to load. It means your site will load faster. and 2. Asynchronous Ads are responsive which means they automatically adjust according to the screen sizes of the device of site user. These are great features and there is no reason you should not benefit from them.

but sometimes the new Asynchronous Ad code and WordPress don’t go well. People often experience problems like – ads are not either displaying at all or not appearing on certain pages. Here are 3 steps that you have to follow to make the New Google Adsense Code work on your WordPress site.

1. Remove all the Adsense Synchronous Ad codes from your WordPress site. Two types of codes on same page can create problems.
2. Go to your Google Adsense Dashboard and get the Asynchronous code of the ad. It will look like this:-

<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!– your ad unit name –>
<ins class=”adsbygoogle”
style=”display:inline-block;width:300px;height:250px”
data-ad-client=”ca-pub-000000000000000000″
data-ad-slot=”000000000000″></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

3. Paste the first line of this ad code above the </head> tag in the header.php file of your WordPress site. You will find Header.php file in – WordPress site Installation folder – WP-Content- Themes- Your Theme. You can use an FTP software or the control panel of your web host to access this file.
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>

4. Now go to your WordPress site and Copy-paste the Google Adsense Asynchronous Ad code in the whatever posts and pages of your WordPress site you want.

That’s it. Good Luck!

bonus

Get the free guide just for you!

Free

Should you master Grammar and Vocabulary before you start reading authentic text?

Dr. Satish Chandra Satyarthi

Dr. Satish Satyarthi is the Founder of CEO of LKI School of Korean Language. He is also the founder of many other renowned websites like TOPIK GUIDE and Annyeong India. He has been associated with many corporate companies, government organizations and universities as a Korean language and linguistics expert. You can connect with him on Facebook, Twitter or Google+

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

You may be interested in

>