Some bloggers want to add google adsense codes to blogger template, but put the codes into the blog pages by manually editing the XML-based template HTML coding interface. In fact, the java can not work.
Usually, you can add the JavaScript codes to BlogSpot in the block.where the codes you can add to above or below the post body, header, footer, within sidebar.
Add google adsense javascript to blogspot.
Go->Layout -> Click Add a Gadget –>click the button on the left of HTML/JavaScript.
Then, add your adbrite or google adsense codes to the form.
if you want add the google adsense java codes to the templates, I mean, in the xml, you should do some change.if not , you may get some error just like:
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 reference to entity “zs” must end with the ‘;’ delimiter.
or
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 processing instruction target matching “[xX][mM][lL]” is not allowed.
then, you can change the java code like this,
< – < |
if you have do this, your java code in blogger templates will work.
for example: put the google adsense javascript to blogspot template:
<script type="text/javascript"><!– |
Don’t worry about violating AdSense TOS or other terms and conditions, as once the blog’s web pages are rendered and presented to the viewers and visitors, the code will be exactly same as the original code before any replacement.ofcource, you can double check it.
2 thoughts on “Add Google Adsense and other JavaScript to Blogger (blogspot) Templates”
Comments are closed.