Ad code implementation

About the AdSense code

"The AdSense code" is the name of the HTML snippet you put on your site to get Auto ads and a range of other AdSense features. If you've been using AdSense for a while, you might know this code by its old name: "Auto ad code". To get the most out of AdSense, place the AdSense code on every page across your site.

Here's an example of the Auto ad code:

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

WordPress user? Get help with adding AdSense code.

Limitations of Auto ads and ad unit code

You can use the AdSense code to get Auto ads, but Auto ads now works through any AdSense ad unit code.

Note: This behavior may not work correctly for ad unit code that is used dynamically, through an ad server, or used via a host partner website.

Was this helpful?
How can we improve it?