We recently launched Your AdSense Page where you can find personalized information about your account to help you succeed with AdSense.

Improving ad performance with the new AdSense code

July 19, 2021

We recently launched a new version of the AdSense code. The new AdSense code allows AdSense to trigger optimization features earlier which can improve the performance of the ads on your site. The new ad code works for both Auto ads and ad units.

Do I need to do anything?

You don't need to take any action. You'll have access to the new ad code the next time you sign in to AdSense and get code from your account.

Do I have to replace my old ad code with the new ad code?

There's no requirement to replace the existing ad code on your site. However, you're welcome to update your ad code if you want to take advantage of the new optimization features.

Tips: If you do choose to update your ad code, make sure that:

  • You update all the ad code on your site. For the most optimal results, we recommend you avoid having a mix of old and new ad code on the same page.
  • Your publisher ID is correct in all new ad code.

What does the new ad code look like?

Auto ads code example:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234" crossorigin="anonymous"></script>

Ad unit code example:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234" crossorigin="anonymous"></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1234"
     data-ad-slot="5678"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

true
' data-mime-type=
Your AdSense page

Introducing AdSense Page: a new resource in which you can find personalized information and new opportunities in your account to help to succeed with AdSense.

Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
157
false