Code implementation guide
Connect to AdSense and show ads on your WordPress site
Are you a WordPress user looking to monetize your site with AdSense? There are several ways to place AdSense ad code into your WordPress site.
If you're new to AdSense, one of your first tasks is to connect your site to AdSense. We highly recommend you use Site Kit for WordPress by Google. Site Kit can connect your WordPress site to your AdSense account and place the AdSense code on all your pages for you. So you can show ads automatically across your site.
Site Kit is a free, open-source plugin for WordPress that helps you access unified metrics and insights from Google AdSense, Google Analytics, Google Search Console, and PageSpeed Insights directly from your WordPress account.
- Go to your WordPress dashboard, and click Add New under the "Plugins" menu.
- Search for “Site Kit by Google”, find the plugin and click Install Now.
- After you've installed the plugin, click Activate.
- Click Start Setup and then follow the steps to set up Site Kit.
- After you’ve completed the setup, click Connect Service under "AdSense". You can find this on the Site Kit dashboard or "Settings" tab.
- Follow the instructions in the plugin. We recommend that you allow Site Kit to place the AdSense code, which will place the AdSense code for non-AMP and AMP versions of your site.
Note: To ensure that ads serve, make sure you’ve enabled AdSense ads in your AdSense account. Site Kit does not have permission to make changes to your AdSense account settings.
When your site is ready to show ads and has traffic, you’ll see your AdSense metrics in the "AdSense" tab of the plugin.
When you connect your WordPress site to AdSense, you can choose to show ads as soon as your AdSense account is activated and start earning money from your content right away.
If you have visitors from the European Economic Area (EEA), you might want to uncheck this option to make sure that you’re complying with Google’s EU user consent policy. You can change your settings for serving ads to users in the EEA after your AdSense account is approved.
Google will analyze your pages, find suitable ad placements, then automatically place the ads for you. Our system will choose the most suitable ads for your page type.
What’s the difference between Site Kit and the AMP for WordPress plugin?
Site Kit lets you connect your site directly to certain Google products and services, including AdSense. The AMP for WordPress plugin lets you create an AMP version of your site built with the open source AMP framework.
Can I see AdSense metrics in the Google Analytics module in Site Kit?
If you'd like Site Kit to display AdSense metrics within the Google Analytics module, you'll need to integrate your AdSense and Analytics accounts.
I’ve set up Site Kit but I can’t see ads on my site. What should I do?
- Make sure you can see "Code has been placed" in the AdSense section in Site Kit settings.
- Check your AdSense account for any outstanding actions. For example, make sure:
- Your site is added on your Sites page.
- Auto ads are enabled on your Ads page.