lightbulb_outline Blog Post: Fast ads matter (web.dev)

Load ad tag asynchronously

Overview

This audit ensures ad tag library scripts are loaded asynchronously. Requesting scripts synchronously leads to content being blocked until those scripts are loaded.

Recommendations

Include the async attribute in the script tag definition. For example:

<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>

More information

The following ad tag library scripts are supported:

Ad Tag Library Script(s)
AdSense

pagead2.googlesyndication.com/pagead/js/adsbygoogle.js

pagead2.googlesyndication.com/pagead/show_ads.js

Google Publisher Tag

googletagservices.com/tag/js/gpt.js

securepubads.g.doubleclick.net/tag/js/gpt.js

Get Started with Google Publisher Tags
GPT request modes and asynchronous rendering