Notification

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

Reminder: The new AdSense code is available

April 4, 2022

Last year, we launched a new version of the AdSense code. We'd like to take this opportunity to remind you that you're welcome to update your ad code if you want to take advantage of the new optimization features. The new ad code is available when you sign in to AdSense and get code from your account and works for both Auto ads and ad units.

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, but doing so will allow AdSense to trigger optimization features which can improve performance of the ads on your site.

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=ignored1234567890123456" crossorigin="anonymous"></script>

Ad unit code example:

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ignored1234567890123456" crossorigin="anonymous"></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ignored1234567890123456"
     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?
true
Unlock Growth Potential

Don't miss out on valuable AdSense insights. Opt in to receive performance reports, personalized tips, and webinar invites that can help boost your earnings

Opt in

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