Lately I have been switching the standard AdSense ads to the new managed ad units on both of my blogs (this one and blog.trade-radar.com). Some of these ads are coded directly in the blog template rather than inside a Blogger Gadget or Widget. A good example of where this kind of coding is required is the sliding ad panel that rises from the bottom of the browser window.
I have also been rolling out a redesign of the TradeRadar blog template. The redesign has required me to make a number of other kinds of changes directly to the template code itself.
Just this week, however, it seems like Blogger has started evaluating Google AdSense code and making undesired changes whenever I save the template.
This is actually the second phase in an aggravating series of events related to inserting AdSense code directly into the blog template.
Problem #1 --
This seems to be a Blogger situation only. Paste the standard ad code into any web page and it works fine with no changes. Paste the ad code into a Blogger template and it doesn't work.
The solution I have used to date is to delete the comments. Unfortunately, this now leads to the second problem.
Problem #2 --
Blogger doesn't recognize the format for managed ad units. If the ad unit code is surrounded by comment symbols, Blogger will not mess with it. As described above, however, I have found that I needed to remove the comment symbols in order to make the ad code work.
When the ad unit code is not surrounded by comment symbols, Blogger interferes with the code, trying to add a value for the AdSense publisher ID into the google_ad_client variable. This, of course, messes up the ad completely.
The workaround --
Is anyone else encountering this problem? Do you have a different or better workaround? Feel free to leave a comment and let us know how you are handling this situation.
Getting started with the OpenLinkz search widget - read these posts and get up and running
Feedback is welcome! Email TradeRadarOperator