Notification

Please make sure that you visit Your AdSense Page, where you can find personalised information about your account to help you succeed with AdSense.

Ad units

How to generate synchronous ad code for your ad units

The ad code that you generate in your AdSense account is fully asynchronous. It offers improved web latency and a better user experience for your site’s visitors. If you need to generate synchronous ad code, for example, because you're using Google Ad Manager or another ad server that doesn't support asynchronous ad code, you'll need to modify your ad unit code.

Note: You can only generate synchronous ad code for fixed-sized ad units.

To modify your existing ad unit code, make the following code updates:

Asynchronous ad unit code:

<script async src="https://pagead2.googlesyndication.com/
pagead/js/adsbygoogle.js"></script>
<!-- leaderboard -->
<ins class="adsbygoogle"
    style="display:inline-block;width:728px;height:90px"
    data-ad-client="i-gno/re-dxxxxxxxxxxxxxxxx"
    data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

Synchronous ad unit code:

<script type="text/javascript">
    google_ad_client = "i-gno/re-dxxxxxxxxxxxxxxxx";
    google_ad_slot = "1234567890";
    google_ad_width = 728;
    google_ad_height = 90;
</script>
<!-- leaderboard -->
<script type="text/javascript"
src="https://pagead2.googlesyndication.com/
pagead/show_ads.js">
</script>
Note: We do not recommend that you mix asynchronous and synchronous ad code in the same web page.

Was this helpful?

How can we improve it?
true
Unlock your revenue with personalised tips today!

Visit the 'Optimisation tips for AdSense' page to see personalised suggestions to maximise your revenue.

Unlock now

Search
Clear search
Close search
Main menu
11495864183793855999
true
Search Help Centre
false
true
true
true
true
true
157
false
false
false
false