Even though I only made a modified version of the adsense plugin available a couple of days ago it has already been superceded!!
Wayne has released a much more advanced plugin that allows you to define multiple adsense code blocks via the “options” menu.
If you have already used one of the existing plugins you do not need to make any changes to your posts, as you can set a default adsense code block to use with the existing < !- - adsense - - >
tag
However, with Wayne’s version you can define multiple adsense blocks of different sizes and styles.
To insert a block into an entry you simply choose what to append to the < !- - adsense - - >
tag. If you had a block called banner you would use < !- - adsense#banner - - >
There are other options as well, which make it probably the best adsense plugin so far.
Unfortunately it does not come with the option to set style tags for inline adsense (like I use on this blog). You can easily put those back in by wrapping your adsense code in a paragaph tags with some CSS:
CSS file
(it won’t display properly in posts 🙂 )
Unfortunately one of the options that Wayne has enabled breaks Google’s TOS.
He has an option to rotate the client ID so that he gets approximately 5% of the earnings. However the terms and conditions of the adsense program clearly state:
In addition, You agree that while You may display more than one (1) Ad Unit on each Site Web page, You shall not display any Ad Unit on a page that contains Ads associated with another Google AdSense customer (e.g., Your Web hosting company), unless authorized to do so by Google.
He may want to remove that option.
Wayne says
Michele,
Wrapping your adsense code with css in the plugin config ought to work fine. again, if I can see where/why it’s not working, I’ll try to provide a workaround.
re: the adsense TOS. Yeah, it was an experiment and I may end up removing it. Alternately, I could restrict it to only activating (if enabled) on individual post pages. In this case, even if you had multiple ad units, they would all use my pub. id if my roll of the dice came up. I’ts only on multiple post pages (archives, search, home page) where more than one advertiser’s ID would show up.
The idea came to me from the digitalpoint seo forums (forums.digitalpoint.com) where I’m an administrator. Anyone with an adsense account who participates in the forums has a chance for the adsense ads showing on their posts, or threads they initiate, to use their pub-id. Seemed like a cool thing to try here, but if I can’t make it safe within the TOS requirements, it will get removed. I don’t want to get myself or anyone else booted from the program.
cheers,
-w
blacknight says
Wayne
I’m sure you weren’t trying to break their TOS, but I felt that a word of caution was warranted, as I’ve heard some horror stories of people being booted off in the past. I only became aware of that particular clause when someone else pointed it out.
Michele
IO ERROR says
My understanding is that each ad unit/link unit on a single page view must have the same pub ID. For instance, if you show two ad units, they must both have the same pub ID. But this applies per URL, not per site. So different pages on the site can have different pub IDs. And I don’t think changing the pub ID on the next page view of the same URL is against the terms, but I’d be wary of it nonetheless, unless I heard from Google one way or the other.
blacknight says
IO Error
I suppose Google are the only ones can give a definitive answer.
Michele