Sunday, September 14, 2014

Adding javascript / html ad codes to blogger templates - Blogspot ad code publishing

I needed to add my chitika ad code to  each of my blog post on blogger.  I tried to put the ad code after <data:post.body/> , but that method didn't worked for me  on my dynamic blogger templates.So finally I used "HTML/JavaScript Gadget" and it really helped me . Now I am running my chitika codes on blogger using this blogger plugin. You can use this plugin in your blogs also , it can be used to display ads , share buttons or even  plain texts.

The steps to add a custom javascript or html code to your blogger is as follows

Step 1

Log in to you blog and Select layout ( usually on the left side ).



Step 2

Select Add a Gadget 


Through this step you can  add gadgets to your blogger . 

Step 3

Select the  html /javascript plugin . This  plugin will enable us to add custom html or javscript ad codes every page of your blog . So your ad code will appear in every post.




Step 4
After adding the plugin a page will open , here you can add your custom ad codes in javascript or in html. You can also add i frames to your sites using this plugin or  even social share buttons .



Step 5


 Finally you can Save everything you have done . 









Now you are done adding your ad codes to your blogger. Enjoy publishing your ads . If you want to detect ad block plus or any ad blockers then you can read 

Detect whether the browser has adblock enabled - adblock detection using javascript and html