How To Convert or Parse AdSense Ad Codes for Blogger Blogs

Parsing Ad Unit Code is one task you should perform before implementing ads inside Theme in your blogging platform. These Ad Units include ad units from Google AdSense, MediaNet, AdBrite, Chitika, Adquet, Ngadverts etc... I am using Google AdSense ad an instance and we all know that Google AdSense is fully integrated with Blogger.

Blogger Blogging Platform doesn't support pasting of  raw google adsense (and other ad networks) ad unit in the html theme. Though other blogging platforms (Tumblr, WordPress, Joomla) Supports this but in blogger, you have to parse the ad unit code to make it implementable in blogger theme.

In Blogger, you will notice whenever you try to insert or implement or put Google AdSense ad units code directly into blogger theme, it results will either be showing blank ads when previewed or HTML error message like :

When you try to preview your theme
“Could not load template preview: Error parsing XML, line 1835, column 10: Attribute name “async” associated with an elementtype “script” must be followed by the ‘ = ‘character.”,
And showing XML (Extensible Markup Language).

When you try to save the theme 
“Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The content of elements must consist of well-formed character data or markup.”

Though, I know all bloggers will notice that adding ad codes inside blogger layout via "HTML/Javascript, doesn't require parsing of ad code. In any case, you need to parse or convert or change the code utilizing a basic trap by simply supplanting just the three extraordinary content characters into basic string content configurations:

  • The left angle bracket ( <) replace with ( &lt; )
  • The right angle bracket ( >) replace with ( > )
  • The double-quote character ( ) replace with (" )

Hence, you can make use of OgbongeTechs single tick HTML/JavaScript parser encoder tool to dispose of  error while changing AdSense code for your blog.

Make use of below html code parser to convert your ad codes (AdSense, Azooge, MediaNet etc)

How To Make Use Of OgbongeTechs Ad Code Parser Encoder Tool 

Paste Your AdSense Ad Unit code inside the praser encoder tool above
Then click "Convert" to prase the ad code finally.

For instance : Below is the result of a prase ad code.

Raw AdSense Ad Unit Code

<script async src="//"></script>
<!-- Ads1 -->
<ins class="adsbygoogle"
(adsbygoogle = window.adsbygoogle || []).push({});

Prased AdSense Ad Unit code

&lt;script async src=&quot;//;&gt;&lt;/script&gt;
&lt;!-- Ads1 --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
(adsbygoogle = window.adsbygoogle || []).push({});

Your Ad Code will has been successfully parsed. You are now free to emded or implement ad code to your blogger theme once it is parsed