How to display Adsense ads within blog posts — blogging tips , internet , tips and tricks — Tech Explorer

How to display Adsense ads within blog posts

By Jal Desai | In: , , | Posted On September 7, 2009

If you own a blog for quite a while, you must be knowing about Adsense and how it works. Simply put, Adsense is a way to earn from your blog by putting advertisements provided by Google in a way that will earn you most revenue. Today I am going to discuss how you can display Adsense ads in your blog posts. The only reason we choose to display them in blog posts because it is the most viewed region of your blog. This increases the chances for an ad to be clicked. But along with it, your ad should not be a hurdle to the reader. doing so may enrage the reader and he won’t visit your blog again. So we will try to put ads in a decent manner which will help you and the reader as well.

It is advisable to use these ad formats in blog post:

  1. Before your post begins (i.e. between blog post title and blog post content) : 468 x 15 link ad unit
  2. After the content of your blog post : 250 x 250 square ad unit

The Procedure:

1) First copy your 468x15 code from adsense website and paste into notepad.

2) Now be a little careful because we will replace some text between (I repeat, between) <script type='text/javascript'> and the first occurrence of </script>

3) Using Find/Replace utility (Ctrl+H), replace:

&lt; in place of <
&gt; in place of >
&quot; in place of "

So this is what your final code should look like:

Display Adsense ads within blog posts

4) Follow same steps as above for the 250x250 ad unit also. Now you will have two modified Adsense codes, ready to be put at a precise place in your blog html.

5) Go to ‘Edit HTML’ sub-section of your blog and check-mark ‘Expand Widgets Templates’ and search for the following code*:

<data:post.body/>

* = You may find two instances of the above code instead of one. In that case, consider the last one.

6) Put your 468x15 link ad unit before the above code and 250x250 square ad unit after the above code. This way, your link ad unit will be displayed before the content and the square ad unit will be displayed after it.

7) Save your template. Enjoy!

If you have any questions regarding this post, don’t hesitate to leave a comment below.

Make your blogging experience better:

How to remove nav-bar from Blogger blog

How to make a ‘sticky’ post in Blogger

How to add favicon to a Blogger blog

Top 10 reasons your blog is ignored

More…

If you enjoyed your read, subscribe to my feeds.

Technorati Tags: ,, Your laptop is fragile. Protect it now.

Share this post

Related Posts :



Newer Posts Older Posts Homepage