If you use Google Ad Exchange (AdX) to serve advertisements on your website, you may notice longer page loading times. The reason for this is due to the synchronous ad tags that are generated for you to use.
Google allows you to manually convert these ad tags to asynchronous ad tags to make your web pages load faster.
AdX Ads are slow. How to improve load time on web pages?
All you have to do is convert your AdX synchronous ad tags to asynchronous ad tags. This guide shows you how.
What your current AdX code should look like :
<script type="text/javascript"><!--
google_ad_client = "ca-pub-0000000000000000";
google_ad_slot = "0123456789";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="//pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
What you need to do is to match it with your AdX code and make note of the following from your code :
The information above from the list are just substitutes used for this example.
Once you have written down the information from your AdX code, replace the information with yours in the below code. Find the substitutes W, X, Y and Z in the code below and replace them with your values. Use the legend from the list above to match where to place the values.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display: inline-block;width: Ypx; height: Zpx"
data-ad-client="W"
data-ad-slot="X"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
What it should look like after converting ADX to asynchronous successfully :
This is what your AdX code should look like, with your values, after converting to asynchronous ad tags.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-0000000000000000"
data-ad-slot="0123456789"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Follow this guide for all of your AdX ad units and replace them on your website to see an improvement in page loading speed.