One AdSense issue that we regularly encounter in support is the error adsbygoogle.push() error: Only one ‘enable_page_level_ads’ allowed per page.

In this tutorial, I will explain what causes this error, what consequences it has for your website, and how you can fix it once and for all.

What causes this error message, and how does it affect your website?

The error Only one ‘enable_page_level_ads’ allowed per page is showing up when you inject the verification/auto ads code from Google AdSense multiple times into your website.

We regularly see pages with this message, and the ads are displaying without any problems. So this warning is not the reason if your ad spaces remain empty and no AdSense ads appear.

However, we encourage you to fix the cause of this error and remove any unnecessary code.

Warning in the browser "adsbygoogle.push() error: Only one 'enable_page_level_ads' allowed per page."
Your browser will show the warning “Only one ‘enable_page_level_ads’ allowed per page” when you inject the Google AdSense verification/ auto ads code multiple times

How to resolve the “Only one ‘enable_page_level_ads’ allowed per page” error?

To fix the error, you need to remove the unnecessary Auto Ads Code insertions from your website.

Find and identify the Auto Ads code

The quickest way to check the auto ads code injections is by opening the source code view of your website in your browser. Use the search function and search for “adsbygoogle” to jump directly to those injections.

Example of the new AdSense Auto Ads code

<script data-ad-client="ca-pub-****************" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> </script>

Example of the old AdSense Auto Ads code

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-****************", enable_page_level_ads: true, tag_partner: "site_kit" }); </script>

Remove the Auto ads code placed with your theme or with other plugins

If the warning Only one ‘enable_page_level_ads’ allowed per page warning is showing up, please remember, if you added the AdSense code anywhere when you signed-up for AdSense.

That could be:

  • another ad management or a header/footer script plugin
  • an option in your theme
  • manually placed code in your theme files

I recommend removing these manual injections and keep the checkbox for this code integration by Advanced Ads enabled.

You can find this option in Advanced Ads > Settings > AdSense.

The integration of Auto Ads through Advanced Ads has two decisive advantages over the other methods. Firstly, you can easily exclude the automatic insertion of Auto Ads on particular pages via a checkbox. And second, the Responsive Ads add-on can automatically convert this code into an AMP-compatible format and insert it on your AMP pages.

If you use a caching plugin on your website, please, don’t forget to flush the cache. Also, ensure that you don’t place the AdSense Auto Ads code somehow else.

Disable Auto ads in Advanced Ads

When you added the AdSense Auto ads code with Advanced Ads and need to remove this injection, then navigate to Advanced Ads > Settings > AdSense, and disable the Verification Code & Auto Ads checkbox.

Resources

Tagged: