Updated AdSense Manager Plugin: Ad Slot IDs and Rounded Corners

Update (August 26, 2013): This plugin is no longer being updated and maintained.

The latest version (2.5) of the very popular and useful AdSense Manager plugin for WordPress by Martin Fitzpatrick doesn’t allow you to use the new ad management features that were recently implemented by Google. Previously you could track the ad performance only by their channel IDs.

Since the November 2007 an additional identifier is available for each of the ad units to which you can assign an explanatory title (for example, 200×200 ads, below article, etc.). These slots are also automatically given a 10 digit ID (like 6567667845) which is assigned to a new variable google_ad_slot inside the ad code.

Theoretically, for displaying an ad you now have to know only your publisher ID and the slot ID, while the rest of the ad’s look and feel can be adjusted through your AdSense account without ever touching the JavaScript which you have placed inside the HTML.

AdSense Manager plugin generates the necessary code for an ad, while you can specify the details of an ad, like text color, border and background color. It is important to mention that using a slot ID doesn’t allow you to change the ad dimensions once you have created it. However, you can always create a new ad unit with desired dimensions through the Adsense account and use the new ID instead.

To summarize the recent changes — you are now able to alter the look & feel of the ads through your AdSense account without touching the ad code. There is also a new visual feature — rounded ad corners.

To use these features also on my blog, I have updated AdSense Manager plugin to include these updates, and release it as an unofficial 2.6 version of this amazing plugin.

AdSense Manager 2.6

I have updated the original 2.5 version of Adsense Manager with the following features:

  • Ability to use ad unit slot ID instead of channel ID, and thus make better use of recent AdSense Ad Management improvements.
  • Added support for the new user interface features — rounded corners: square corners, slightly rounded corners, and very rounded corners

Useful information

Read the Google Help Center information: Managing AdSense Units. Here is a suggested use for AdSense Manager and your AdSense account:

Google AdSense Account

  • Create new ad units (ad slots)
  • Assign channels for each ad unit (slot)
  • Adjust ad style of an existing unit.
  • You will not be able to adjust the dimensions (and type) of an ad that has been previously created. Simply create a new one and specify the new slot ID in your AdSense Manager.

AdSense Manager

  • Configure the look&feel of the ads through AdSense Manager, but create the ads through AdSense Account (to get the Ad Slot ID).
  • Use only the channel feature (no ad unit slots) for tracking your ad performance, and thus have full control over the look&feel and the size of your ads through the AdSense Manager plugin.

Found a bug, got suggestions?

Please, leave your bug reports that could be possibly related to the functionality changes described above in the comments. Your suggestions are always welcome.


  1. Kaspars says:

    Hi Debbie, this is Kaspars (author of this blog). I am sure that Martin (author of the plugin) will read your question and respond here.

    My suggestion for you would be the following: create a Google search box through your AdSense account (setting the colors and other configuration) and paste the resulting HTML code in your theme’s file header.php (under Presentation > Theme Editor) in a location you want.

    After having a quick look on your site’s code, it should come right after your logo and slogan — replacing <?php include (TEMPLATEPATH . '/searchform.php'); ?>.

    The other option would be to use Direct Code Ad from Product drop-down menu when creating a new ad “unit” through AdSense Manager plugin, and paste the search box code you generated through your AdSense Account. But notice that you will still need to edit the header file of your theme, in order to place code generated by AdSense Manager (like <?php adsensem_ad('name'); ?>) instead of current search bar.

    Regarding the AdSense for Mobile — for that you must edit your theme’s code to include the PHP code generated by Google when you set up a new mobile ad slot (more in Google Help for Mobile).

    If you have any more questions, please ask.

  2. Debbie says:

    Hi Martin,
    I may not be in the right place to ask these questions, so please tell me if this is so. So far, I have made $1.65 using your AdSense plugin. I see potential here and would be very willing to “Be Nice” as that amount increases. My questions are these: If I want to put a AdSense for search box in my header so it will be on every page, is that possible? And, have you done anything with AdSense for Mobile?

  3. Evert Jan says:

    Thanks for this great plugin!

  4. Martin says:

    Hi Debbie, I’ve not done anything with AdSense for Mobile yet, but I’ll have a look into it. I’m working on updating the plugin to include other Ad networks so I’ll see if it needs supporting separately and if it can be.

    Kaspars instructions for AdSense for Search are spot on. Having said that the last time I tried to use it there were a few problems with integrating it with WordPress (e.g. getting rid of the WordPress search box and Google also asks you not to show other Ads on search result pages). You’ll need to decide whether the likely revenue you’ll generate from AdSense for Search is worth the tweaking – I personally never made a penny from it, but you may have more luck!

    Lastly, please don’t feel obliged to Be Nice while you’re just starting out – I don’t want to support development at the expense of up and coming blogs. Just don’t forget me when you’re rich ;)

  5. Deborah says:

    Sorry about that, I must have gotten lost. Thanks for your answer, it helped a lot. I have another question that goes in a different direction. I’m considering putting an ad up for Yahoo! Webhosting. Is that possible in WordPress?

  6. Deborah says:

    Thanks for your help. I’ll take your advice and drop the AdSense for Search in favor of the AdSense for Content that I’ve made $2.49 with so far. And I will remember you when I’m rich.

    As for the Yahoo! Webhosting question, I now have 2 friends at work that want to start their own blogs, and they want to use Yahoo. That means if I could figure it out, I could earn $120. So that is the driving force behind the question.

    But on to something else, WordPress is a great tool and not many people truly know how to use it. The guy that helped me get started seems to be avoiding me, I’ve asked him so many questions (just kidding). When I search in WordPress I never find any help that I can relate to. It must be way over my head, and that wouldn’t take much. So, thanks to both of you guys for all your help!

  7. Missy says:

    Hi—I downloaded this great plug-in, but when i go to activate it in my blogs wp-admin panel, i get message, stating “Plugin file does not exist”.

    What did i miss?

  8. Kaspars says:

    Missy, in which directory are your files for the AdSense Manager located? Are they in a subfolder under the wp-plugins folder (like /wp-content/plugins/adsense-manager)? Do you have adsense-manager.php in this directory?

  9. Missy says:

    Hi—Kaspars: I have just the regular wp plugins directory folder, it reads: /g34media.com/wp-content/plugins.

    There are 6 files in this directory for adsense mgr, and YES one reads, .php

  10. Kaspars says:

    Missy, the error message is generated by the plugins.php, which includes the following lines of PHP:

    if ( ! file_exists(ABSPATH . PLUGINDIR . '/' . $plugin) ) wp_die(__('Plugin file does not exist.'));

    This means that either ABSPATH or PLUGINDIR variable is incorrect. However they were set during your WP setup. Have you changed the host since the first installation of WP?

    Have you had similar problem with other plugins?

    If other plugins are working fine, then what FTP software are you using for transferring the plugin files, and what transfer type (ASCII, Binary or Automatic) has been set? Automatic or Binary are the suggested (more about FTP transfer types).

  11. Missy says:

    G34 Media is a new self-hosted WP blog, and i just installed it a few days ago. I use DreamHost as my host provider and for FTP, i use a web-based client called Net2FTP.

    Yes, i have been having problems with my plug-ins for all my WP blogs. Sometimes they go through, and other times, i keep getting the following error message:

    Checking files:
    File statpress.zip is OK
    Transferring files to the FTP server:

    Processing archive nr 1: statpress.zip
    Unable to extract the files and directories from the archive

    As for the transfer type it is set at: Automatic. Thanxs for all your responses and help. I appreciate it.


  12. Kaspars says:

    Missy, the web-based client seems to be the problem — you are uploading archived plugin files which are then extracted by the server.

    I suggest you unarchive the files on your own machine and then use the free and opensource FTP client FileZilla for transferring the files to the server. This way plugins will definitely work.

    Read more about using FTP clients at the DreamHost’s FAQ: How do I use FTP to upload my site?

  13. Martin says:

    Missy, if the files for AdSense Manager are ending up in /g34media.com/wp-content/plugins you might want to try moving them to /g34media.com/wp-content/plugins/adsense-manager – that is, into a seperate directory of their own.

    Most WordPress plugins expect to be in their own directory within the plugins directory, and AdSense Manager is one of those. I’ll have a look and see if it’s possible to stop this throwing an error, but let me know if it solves the problem for now!

  14. Eric says:


    I am trying to put your AdSense manager to my new blog: http://www.wantearnmoney.com/index.php

    but as you can see it show me only: but any google AdSense :-( I use WordPress 2.3.2

    Thank you Eric

  15. Kaspars says:

    Hi, Eric. It seems to me that you are using the rich text editor for creating your posts (under WP Write Post tab), right? This is why it converts all the input to HTML entities, instead of leaving it as an HTML.

    If so, please edit the post — switch to the Code mode and paste <!--adsense--> at the place you want.

  16. Eric says:

    Hi Kaspars, yes you are right :-) Thank you for help!

  17. Tom says:

    I’m using adsense manager on my WP blog. It seems today for some reason only the newest post will display ads. I’ve got it set to display one post per page. I was getting ads on each post before. I’m not sure where to go from here.

    Any help or suggestions would be appreciated.

  18. Tom says:

    I apologize for not checking more thoroughly.
    The ads don’t display if I user the “older” and “newer” navigation bar. If I open each post seperately the ads display fine.

    It must have something do with WordPress.

  19. Kaspars says:

    Tom, the problem seems to be related with the K2 theme you are using (and not WordPress), which generates the posts through javascript — thus no request for ads is sent to google when using the timeline slider.

    In general, I think this is not a good idea to use such sliders from the point of accessibility and usability, although it may seem a nice “feature”. I don’t know if you have an option turn this navigation off, but I suggest you take a look and decide yourself.

  20. Gopinath M says:

    First of all thanks for the wonderful plugin.

    I’ve a small problem while using the plugin to import adsense code of multiple accounts. I wanted to share my wordpress blog with my friend. When I imported his adsense code to Adsense Manager, all the ad-units(including mine) are changed to his publisher id.

    Seems to be this plug in supports only code of a single adsense account. Is there any way using this plug in with multiple adsense accounts?

Leave a Reply