HashOut: AdSense
Showing posts with label AdSense. Show all posts

Placing AdSense Ads in the middle of Blogger posts

Hackman has an interesting hack to place AdSense ads right in the middle of your blogger posts. In this hack, Hackman places a HTML comment at the desired location in the post body while composing the post. Then using JavaScript he moves the contents before the HTML comment to a blank <div> tag before the AdSense code.

Hackman's hack is meant to work with the classic templates of Blogger. I have tweaked it a little to make it work for the new Blogger (layout) template. Here you go...

Find the <data:post.body/> tag in your new Blogger (layout) template and replace it with (Use copy-paste as some text below might be out of view):

<b:if cond='data:blog.pageType == "item"'>

<div expr:id='"adsensical" + data:post.id + "start"'></div>

<div style="margin:5px 0 -5px 10px">
<!--PLACE YOUR AD CODE HERE-->
</div>

&lt;div id="adsensical<data:post.id/>end">
&lt;div id="adsensical<data:post.id/>body">
</b:if>
<data:post.body/>
<b:if cond='data:blog.pageType == "item"'>
&lt;/div>
&lt;/div>

<script language="JavaScript">&lt;!--
//AdSensical Place Ads in Middle of Blogger Posts
//By hackman_3vilGuy http://adsensical-adsense.blogspot.com
//hackman {AT}caller {DOT}me {DOT}uk
//Modified for New Blogger (Layout) Template by Aziz (http://hashout.blogspot.com/)
topbit=document.getElementById("adsensical<data:post.id/>start");
bottombit=document.getElementById("adsensical<data:post.id/>end");
s=document.getElementById("adsensical<data:post.id/>body").innerHTML;
var regexIndex=s.search(/&lt;!--adsense-->/igm);
if(regexIndex>0) {topbit.innerHTML=s.substr(0,regexIndex);bottombit.innerHTML=s.substr(regexIndex+14);}
//-->
</script>
</b:if>


Now just replace <!--PLACE YOUR AD CODE HERE--> with your AdSense JavaScript code which you got from AdSense Setup and place <!--adsense--> anywhere within your post where you want the ad to appear (Make sure you insert it in Edit HTML mode).

The above code displays ads only on item (post) pages. If you want to display the ads on main or archive pages also, just remove the <b:if cond='data:blog.pageType == "item"'> and </b:if> tags. AdSense will automatically display only the first three ads on the page (in order of its appearance in the HTML) including the ones outside the posts section.

If you do not insert the HTML comment into your post content (HTML), then the ads will appear before the post body, but after the post title.

If you would like to see it working live before you begin implementing it on your blog, take a look here.

Related posts:
» Continue reading

Read more on , , ,

Darren answers my questions on blogging and podcasting

When I woke up this morning to a pleasant weather, little did I know about the surprise lined up for me today.

As I signed in to my email inbox, I received this comment from Shypy, a new reader who informed me that my blog was featured on ProBlogger. Without any further delay, I hit ProBlogger and saw that Darren had answered some questions which I had posted on ProBlogger in response to his invitation for reader questions in February.

You might ask why is it so important for my questions to be answered on ProBlogger. The answer is ProBlogger is an A-list blog and, in order to improve one's blog or website ranking on Google and other search engines, it is necessary to get it linked from other A-list (top ranking) blogs and websites. Not only that! The visitors or readers of that site or blog are also directed towards your blog or website. Read my earlier post on How to grab the attention of A-list bloggers for some creative ideas.

Darren has not only answered my questions but he has linked to my blog, sending over lots of precious readers from his blog and also helping me improve my blog ranking. Thanks Darren! I just love you for that.

Sometimes your hard work doesn't really pay off immediately, but it surely does at some point of time in the future, as you can see it has been over 3 months since I posted those questions on ProBlogger. The comment has really paid off in terms of more visitors and readers directed towards HashOut from ProBlogger and hopefully improving my blog ranking in the long run.

So go ahead on a commenting spree. Find opportunities to comment. Comment when you feel that you can add some value to the conversation and you're sure to hit the Jack Pot.
» Continue reading

Read more on , , , , ,

Chow Soup for the Soul... oops! Sorry, for the Bank Account

Chow Soup for your Soul... oops! Sorry, for the health of your Bank AccountHow healthy is your Bank Account? Not very? Get some Chow Soup from JohnChow.com to help you make money online!

What! Never heard of John Chow? You must be kidding...

This Chinese born, living in Vancouver-Cananda, is not just a self proclaimed Dot Com Moghul but is quite popular in the blogosphere for his creative rather than evil ways to make money online.

John Chow started The Tech Zone back then during the dot com boom and heavily cashed-on on it. Now that the dot com boom is over, he still continues to take advantage of the various opportunities that the Internet offers to make money online, blogging being one of them.

His personal blog "John Chow Dot Com". Yes, literally "John Chow Dot Com" -- I know how funny and unprofessional it sounds, but don't go by the name! It ranks 157 on Technorati at the time of this writing and grossed $8,000 USD in the month of March. So no matter how unprofessional he might be at his job, he has got some real good stuff to offer for you to prosper.

John Chow already leads a retired life - Yes, retired! Even though he still actively blogs and helps thousands, if not millions, to make money online. According to him retirement is the freedom to do what you want, when you want, at your own pace.

The best part is John and I have very similar interests -- computers, cars, traveling and anything that has to do with the Internet. Not just that! My blog, like his, does not follow any niche... So am I the next Dot Com Moghul?

By the way, if you remember, John Chow has been really very creative in attracting readers from other A-list blogs. Take a look at his love for Darren Rowse and helping him make money, as though Darren needed his help desperately.

Another of John Chow's evil but creative idea, which he is rather proud of than being ashamed of, is his "Review my blog" campaign. In this campaign he offers to link to your blog in return for reviewing his blog. Yes, that is why you are reading this post here! Well actually he wants to be listed No.1 on Google for the search phrase "make money online" and hence to amass links to his blog with that phrase. Hope that reminds you of my own review my blog campaign.
» Continue reading

Read more on , , ,

Integrating Google Co-op Custom Search Engine (CSE) with your blog.

Google Co-op's Custom Search Engine (CSE) gives a great amount of flexibility in seamlessly integrating the search functionality into your blog. Here I will show a simple way to integrate the search functionality in a blogger (new version) blog.


  1. If you have not already created a Custom Search Engine then create one now here.
  2. Once you create your Custom Search Engine, you'll get the following confirmation page:
    Google Co-op > Custom Search Engine > My Search Engines - Screenshot
    If you have already created a custom search engine, click My search engines.
  3. Click control panel
  4. Click Code
  5. Now if you do not want the search results to be blended along with your website / blog layout...

    1. Under Search box code for your website select how you want the Google logo to appear. If you do not want a google branding on your website/blog then leave it as it is. We shall remove it later.
    2. Click Save Changes
    3. Click anywhere on the box below the line which says "Paste this code in the page where you'd like your search box to appear. The search results will be shown on a Google-hosted page." The entire contents of the box will be highlighted which means it has been selected and now you can copy it straight to the page / template where you want the search box to appear.


    If you want the search results to be integrated into your website or blog...

    Note: If you are using the new version of blogger and want the search results to appear as if they were on the same blog, you'll have to create another blog with the same layout template. For example for HashOut, I have created another blog with the url searchhashout.blogspot.com with the same header and footer elements but nothing in between.

    1. Click Search box and search results code for your website
    2. Select how you want the Google logo to appear. If you do not want a google branding on your website/blog then leave it as it is. We shall remove it later.
    3. Under "Specify the URL of the page on your site where you want the search results to appear:" enter the url of the web page or blog where are going to paste the search results code. If you're using the new version of blogger enter the URL of the blog you created for your search results.
    4. Select how you want advertisements to be displayed in your search results. You can later even monetize from the ads displayed in your search results by linking your AdSense account with your Google Co-op CSE.
    5. Click Save Changes
    6. Click anywhere on the box below the line which says "Paste this code in the page where you'd like your search box to appear." The entire contents of the box will be highlighted which means it has been selected and now you can copy it straight to the page / template where you want the search box to appear.
    7. Now select and copy the code from the box below the line which says "Place this code in the page you'd like your search results to appear." and paste it into the HTML source code of the page on your website or blog. If you're using the new version of blogger insert the search results code into the template of your new blog you created for search results, in a place where you'd like it to appear. I inserted the code in between the header and footer elements.

  6. Now if you do not want the Google branding on your search box then you can remove the line highlighted in red below:

    <!-- Google CSE Search Box Begins -->
    <form id="searchbox_012345678901234567890:abcdefghijk" action="">
    <input type="hidden" name="cx" value="012345678901234567890:abcdefghijk" />
    <input type="hidden" name="cof" value="FORID:11" />
    <input name="q" type="text" size="40" />
    <input type="submit" name="sa" value="Search" />
    <img src="http://google.com/coop/images/
    google_custom_search_smnar.gif" alt="Google Custom Search" />

    </form>
    <!-- Google CSE Search Box Ends -->

  7. Save, publish and You're done!


If you want to monetize the ads placed in your search results, click Make money under Control panel and follow the steps as instructed.
» Continue reading

Read more on , , ,

How to place google adsense code on web pages

I know that this post might sound silly, but there are indeed people coming to this blog searching for "step-by-step procedure to place google adsense code in our web pages". It's not necessary that all of them out there are an expert like you. So if you're new to HTML and web design, here is a guide to add adsense code to your webpage.


  1. The first step is to get your AdSense code.

    1. Sign in to your AdSense account
    2. Click AdSense Setup
    3. Click AdSense for content
    4. Choose the ad type you want then click Continue
    5. Choose the ad format and colors then click Continue
    6. Choose or create new channel(s) for the ad then click Continue
    7. Click anywhere on the Your AdSense code: box. The entire code will automatically be highlighted / selected. You'll know the code has been selected when the entire contents of the box are highlighted in blue. Now copy the highlighted code (Press Ctrl+C on a Windows PC or right click and click copy or from your browser's Edit menu, choose Copy in order to copy the highlighted area.).


  2. Now we'll proceed to paste the copied code to the HTML source of the webpage.

    HTML (Hyper Text Markup Language) is the programming language used to write web pages for the World Wide Web (WWW). Web browsers use HTML to interpret and display the contents of the web page. All HTML documents consist of elements contained within bracketed tags which tell the browser how to treat the contents of the element. Most HTML elements are contained within an opening tag <XXX> and a closting tag </XXX> where XXX is the tag identifier like HTML, HEAD, BODY, TABLE, DIV, SPAN etc. Some elements do not have a closing tag and are represented by the <XXX/> tag like BR, IMG etc. An HTML document has the following basic structure:

    <HTML>
    <HEAD>

    </HEAD>
    <BODY>

    </BODY>
    </HTML>

    The opening <HTML> tag indicates the start of an HTML document. The header information is enclosed between the HEAD tags (<HEAD> and </HEAD>) and is not displayed when you view the page in a browser. Any text between the BODY tags (<BODY> and </BODY>) is displayed in the browser. The closing </HTML> tag indicates the end of the HTML document.

    We need to place the ad code between the opening <BODY> and closing </BODY> tags of the source code.


    1. Open / Run your HTML editor
    2. Open your HTML source code file (Usually a .htm or .html file and if you are using server side scripting then the web page file would usually have a .asp, .jsp or .php file extension).
    3. Click to place the cursor on the spot where you want to place your ad. Now click Paste from the Edit menu.
    4. Once you've finished pasting the AdSense code in all the desired locations (currently you can have a maximum of three AdSense ad units on a page.), save the page and upload or publish your updated web page(s) to your web server.


Please note that the AdSense code which you pasted should look exactly the same after saving and publishing the page(s), else it might violate the AdSense Terms of Service (TOS) and might not even show the desired result.
» Continue reading

Read more on ,

How to insert Google Adsense ads before or after each post in the new version of Blogger?

If Ad revenue is crucial to your blog then the best place to display your ads is within the main contents of your website or blog as that is what the visitors came looking for. Secondly, it should be "above the fold", i.e. on the visible portion of the page when the page is first loaded as most users don't even scroll down to read the entire post.

In this post I will show how to insert ads after each post title and before the post body (content) in the new version of Blogger. You do not have to insert the code manually into each of the posts. All you have to do is insert the code once into the template. The AdSense server will then automatically display the first three AdSense ad units on the page and there won't be any violation of the TOS too!

Here are the steps:

Note: Before you proceed with any template modifications, it is always a good idea to take a backup copy of your template so that you are safe just in case you or the Blogger server goofs up.


  1. Sign in to the new Blogger
  2. Click on Layout under the Manage: section of one of your blogs. Or click Template if you are already on Posting or Settings tab
  3. Click Edit HTML
  4. Click Download Full Template in order to make a backup of your template on your hard-disk drive.
  5. Click to check the Expand Widget Templates checkbox
  6. Now search for the following line in your template:

    <p><data:post.body/></p>

    and insert the AdSense 336 x 280 Large Rectangle code just before the line as shown below:

    <script type="text/javascript">&lt;!--
    google_ad_client = "pub-YOURPUBLISHERIDHERE";
    google_ad_width = 336;
    google_ad_height = 280;
    google_ad_format = "336x280_as";
    google_ad_type = "text_image";
    google_ad_channel = "";
    //--></script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    <p><data:post.body/></p>

    Replace YOURPUBLISHERIDHERE with your AdSense publisher ID. To find out your publisher id, sign in to your Google AdSense account, click My Account tab and check AdSense for Content under Property info section.
  7. Hit SAVE TEMPLATE.
  8. You're done! Now take a look at your blog.
» Continue reading

Read more on , , , ,

Blog Study: Acquire Wisdom and Live With Passion

Screenshot of Sam Chan's blog Acquire Wisdom and Live With PassionSam Chan of Acquire Wisdom and Live With Passion needs some suggestions to improve his blog. Well, frankly speaking, I feel the blog is quite good enough for its purpose. However, Sam can surely make certain changes to help his blog visitors. Here they go:


  1. The first thing I noticed was that there are a lot many posts on the home (index) page. I feel that could increase the time required to download the complete page resulting in visitors with slow download speeds abandoning the blog without even having a look at it.
  2. If ads are an important source of income for Sam then I feel they should be placed somewhere above the fold i.e. somewhere at the top of the page so that visitors don't have to scroll down to view the ads. They should preferably be placed after the post title and within the post body. AdSense's Large rectangle is the format that will give best results.
  3. The search box can be placed somewhere at the top right corner of the page which is kind of default location for search boxes. Further Sam can use Google CSE to tightly integrate the search facility into the blog and also monetize user searches.
  4. Even though Sam has changed the default background image of the standard blogspot template "Thisaway Green", it would be advisable to further customize the template so as to have a unique identity.


The best part of Sam's blog, as told by Kerry Dale Hancock Jr is that he "knows how to put the perfect picture with all his posts."
» Continue reading

Read more on , , ,

John Chow gets at it again!

I've spotted John Chow's ad yet again on Problogger.net. This time with a different message. Here take a look.

John Chow's (from www.JohnChow.com) ad on Darren Rowse's Problogger.net

John Chow from www.JohnChow.com has been very imaginative and creative in designing his ad campaigns which have inspired many other bloggers like Mani Karthik of dailydose4me. Click here to see his previous ad campaign on Problogger.
» Continue reading

Read more on , ,

Nokia sets stage for mobile advertising with Nokia Ad Service

Nokia Ad Service, a platform for advertising on mobile web applications and servicesNokia recently announced the launch of its Nokia Ad Service, a service similar to Google Adwords and Google Adsense, but for mobile advertising and providing an end-to-end solution for advertisers and publishers.

Connecting advertisers to mobile internet publishers

The service will enable advertisers to target and display banner, text link and interstitial advertisements on mobile internet applications and services.

Publishers will be able to generate revenue from the traffic that they generate by placing a piece of code onto the desired location on the mobile web application or service.

Nokia Ad Service will take a cut out of the advertising revenue that the publishers in the network earn.

The service is operational in Europe as of now and will be available globally in the second half of 2007.

For more details on Nokia Ad Service visit http://www.adservice.nokia.com/
» Continue reading

Read more on , , , , , ,

Adsense Status Google Gadget for Google Desktop Sidebar

Adsense Status Google Gadget add-on for Google Desktop SidebarDo you know that there exists a Google Gadget for Google Desktop software that displays your latest AdSense earnings status?

Adsense Status is a plug-in for the Google Desktop sidebar. With Adsense Status, you can view your Google Adsense earnings for Today, Yesterday, Last 7 Days, This Month, Last Month, Since Last Payment and All Time. It displays informaiton like page impressions, clicks, page CTR, page eCPM and your earnings from Adsense for Content, Search and Referrals.

You can download Adsense Status here.

Note: To use Adsense Status, Google Desktop is required.
» Continue reading

Read more on , ,

How does a Google Adsense payment check look like?

Yet to receive your first Google Adsense cheque? Wondering how it would look like when you receive your cheque! Don't worry, you have to wait no more. Here, take a look at one.

Google Adsense cheque
» Continue reading

Read more on ,