Adding AdSense Auto ads to your WordPress site

Google has announced, today, a new style of AdSense ad – the "Auto ad". Using machine learning, the code will insert adverts into your site where it things they will be most relevant.

Auto ads balance revenue and user experience by delivering the right ad at the right time to your visitors.

They can even be added side-by-side with your existing, fixed, AdSense advert. And it's really easy to add these to your WordPress site.

Head to your AdSense account and find the Auto ads option under 'My Ads'.  Configure Auto ads appropriately (you can choose what types of adverts that they'll use) and then grab the JavaScript code that is generated.

Open up your theme's function.php file and then insert the following code…

Finally, replace `[[insert your AdSense script here]]` with the JavaScript that Adsense gave you earlier and… that's it. Auto ads should now appear on your site.

Posted by David Artiss

Enterprise Happiness Engineer for the WordPress VIP team at Automattic. Gamer, film lover and general fan of all things Marvel, Star Trek and Star Wars. Failed comedian. Writer for The Big Tech Question. World's Greatest Grandma.

1 Reply to “Adding AdSense Auto ads to your WordPress site”

Talk to me!

This site uses Akismet to reduce spam. Learn how your comment data is processed.