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

Code implementation guide

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.

Tip: WordPress user? Get help with adding AdSense code.

Code example

Here's an example of the Auto ad code:

<script async src="" crossorigin="anonymous"></script>

Note: If you copy this example code, make sure you replace "YOUR_PUBLISHER_ID" with your own publisher ID.

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?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center