Google AdSense Plugin for WordPress
Google AdSense is the official WordPress plugin from Google for adding AdSense ads to your WordPress site. The plugin allows you to choose each templates of your site and place ads according to your need. For example, you can place a 300×600 ad in your sidebar only for a blog posts and disable ad display in any specific page. The plugin also includes the verification tool for Google Webmaster Tools account and places ads on the verified sites as per AdSense publisher guidelines.
Google changed the name of the plugin to “Google AdSense” from “Google Publisher”. Later, Google also discontinued this WordPress plugin. We left this article only for historical reference, check out separate article on how to insert ads in WordPress site.
Installing and Using the Plugin
Go to WordPress plugin repository and install Google AdSense plugin. Activate the plugin and access the settings page under “Settings > AdSense”. First step is to verify your site with Webmaster Tools account and then click on the “Manage Ads” button available under “Ad Manager” box.
Features of Google AdSense Plugin for WordPress
Plugin offers three basic functions:
- Verification of site with Google Webmaster Tools account
- Ad Manager for adding ads on your content
- Automated ads for mobile devices
It is mandatory to verify your site with Webmaster Tools account before you use Google AdSense plugin. Once your site is verified then click on “Manage ads” under “Ad Manager” to place ads on your site. First Google will analyse your site for better ad placement and at this point of time custom templates are not supported for ad placements though you can still use the plugin on custom templates.
Site analysis will show whether there are problems on your site like existing ad codes and custom templates or everything is fine.
After the analysis, you can choose the template like “Single Page” or “Single Post” and start placing the ads. Plugin will automatically show suitable places on the selected template where ad placement is supported.
You can just click on the placeholder to create ad on that spot and change the ad settings by clicking on the gear icon. If you do not find suitable place then you can add manual spots by modifying theme’s php files.
Click on “Save & activate” button to enable ad display and Google will take sometime to start showing ads.
Next step is to activate “Automated Mobile Ads” option to enable your ads are converted for a mobile layout when viewed in mobile devices.
“Ad Manager” is used to place ads which will be displayed in desktop and mobile devices in the same format. For example, if you have placed an ad with 728×90 horizontal banner without activating “Automated Mobile Ads” then the same format of ad will be displayed both in desktop and mobile devices. “Automated Mobile Ads” will enable changing the ad format to suit viewing on mobile devices, probably in 300×250 format.
Once you activate your placements, Google will automatically create ads in your AdSense account which can be seen under “My ads” tab. Any modification to the ads done in your AdSense account will be reflected back in your site.
Disabling Ads on Specific Pages
As per AdSense policies, you can’t place ads on pages like “Newsletter” or “Thank You”. Google made this possible by adding the “Disable ads on this page” option on WordPress page editor. Disabling ads is only possible on pages and it is not possible to disable ads on specific posts.
This is a basic plugin from Google for WordPress publishers but there is still a long way to go for Google to enhance the plugin with more features and reporting functions.
Ad Placement in WordPress with Google AdSense Plugin
Google will start analyzing your site and display a message accordingly. Custom post templates are not supported by AdSense though ads can be still placed. Google does not guarantee perfect display and placement on custom post types. You can choose the template file to see placeholder marks where Google spots possible ad placement.
If the identified placeholders satisfy you requirement then you can add three ads as per Google AdSense publisher guidelines and activate your changes. If the plugin does not detect a spot where you want to place an ad then you need to modify theme’s core files to create a spot.
Google servers need some time to grasp the changes and display ads on your site. Each ad placement will add corresponding ad units in your AdSense account which can be seen under “My ads” tab. You can modify your ad style from your AdSense account.
Modifying Theme Files for Creating Ad Spots
Assume you want to add an ad below your post content and the plugin does not detect that spot by default. Then go to “Appearance > Editor” and choose the php file for your post (it is generally named as “single_post.php”). Place the below code at the end of the php file and update the file.
Provide any unique name to your ad.
Now go back to the plugin and look for the ad placement of single post template. You will find a placeholder mark below your content exactly where you placed the ad code.
Generally the ads are displayed on the live site when published but if you want to preview the insertion block outside AdSense plugin then modify the above code from “display : none” to “display : block” so that the ad block can be viewed during your testing or any other developments.
Once you finalized your placements don’t forget to change the code back to “display : none”.
If you see the placeholder in grey color then the plugin thinks that area you had inserted code is unclickable and you may need to use some other area for creating placeholder spot.
Adding AdSense Ads in Sidebar and Footer
It is very easy to add ads in your sidebar or footer using “Text” widget. Drag and drop the “Text” widget and paste the below code inside the text area.
Provide any unique name to your ad.
Adjusting Ad Format for Mobile Devices
Ad placement through “Ad Manager” will display ads in both desktop and mobile devices but the problem is the ad format will not be adjusted to suit mobile devices. For example, if you have placed 728×90 banner in the header of your site the same ad size will be displayed in mobile device as well making it not looking good.
Activate “Automated Mobile Ads” settings in order to auto adjust your ads to suit mobile devices. In the above example, the ad format will be changed to “320×50” format when viewed on mobile devices.
Google AdSense Plugin for WordPress
- Reliability - 10/1010/10
- Usability - 9/109/10
- Mobile Ads - 10/1010/10
- Reporting and Ad Blocking - 0/100/10
- Ad Placements - 6/106/10
AdSense plugin makes it simple for publishers to add ad code along with webmaster tools verification and automated mobile ads. Hope Google will come up with many reporting and ad blocking features within the plugin.
- Google’s official plugin, so no need to worry about the ad placement guidelines when using default ad placement.
- Ads are automatically adjusted for desktop and mobile devices.
- Integrated site verification with Webmaster Tools account.
- You can combine normal ads and plugin ads within the numbers allowed.
- Plugin does not allow placing link ad units.
- Does not offer an option to disable ads on specific posts.
- Ad placement on certain places looks very congested without enough space between the content and ads.
- No built-in statistics reports available within plugin.