Wednesday, August 26, 2009

Google Certified Ad Networks with AdSense

Google has announced an interesting new feature in AdSense, Google-certified ad networks.

Ad networks are like the ad marketplaces where advertisers and publishers get together. Though the advertisers and publishers don't meet each other physically, the ad network works as the intermediary between these two parties who want to buy and sell advertising space.

Up until now, AdSense served only AdWords ads (except for some display ads from third party vendors). With this change, they are going to allow third party ad networks to serve ads to AdSense publishers. This feature will be initially made available to publishers in North America and Europe, but according to Google, will be rolled out to other regions in due cause.

This means that more advertisers will be competing for ad spaces and the additional competition is certainly good news for publishers.

For more information, see this post on the AdSense blog.

Friday, August 7, 2009

Why the URL colors changed suddenly?

Copying content from MS Word and pasting directly on to the Blogger post editor can upsets the template styles and on most occasions, it directly affects the URL colors (i.e. the link, visited link colors etc). Over the past six months or so I have observed this question getting raised on the Blogger help forums several times and on all occasions it was caused by the same reason. (see this one for example)

Here's how it happens.

The text editor in MS Word is referred to as a Rich Text editor, meaning that it support various rich formatting such as bold, italics, different fonts and colors and also many styles such as Heading 1, Heading 2, Body Text and so on. It's true that Blogger editor also gives some formatting options, but MS Word offers much much more style and formatting options. In order to support these additional formatting, MS Word keeps a whole lot of meta data in addition to the basic text you type. If you copy some text from a Word document, all the meta data also gets copied in the background and, when you directly paste that on to Blogger, you get that whole gamut of meta data as well. (Paste a single word directly from MS Word, go to the Edit HTML mode of Blogger editor and see the amount of meta information that get's pasted for that single word)

Once you publish such a post, your template styles get messed up due to the styles copied over from MS Word and the final result will be problems such as the one describe above.

If you draft your posts using MS Word, first pasting on to a simple text editor such as Notepad will strip off all the style information and will leave you with only the text you typed. Then copy from Notepad and paste on to Blogger editor. You will now have all what you typed minus all the formatting (such as bold, italics, fonts etc). This obviously has the problem of you having to reapply all the formatting using the Blogger's editor, but that is a safer approach as it will not mess up your template styles.

(Note: Same problem can occur with other Rich Text editors as well)

Wednesday, August 5, 2009

A Better Read More Option

In a previous post I presented a simple technique to add a Read More option to hide a desired portion of long blog posts. But that method has a drawback because it shows the "Read More" link even for the posts that do not have hidden parts.

Here's an improved version of that technique which shows the Read More link only if you have decided to hide part of a post. [Note that the "Read More" link will be displayed only on the blog home page and archive (i.e. label) pages]

1) Go to Layout -> Edit HTML and click the ‘Expand Widget Templates’ check-box.

2) Locate the </head> tag and copy the code shown in red in the following snippet, above that tag.

]]></b:skin>
<b:if cond='data:blog.pageType == "item"'>
<style>span.fullpost {display:inline;}</style>
<script>function tbgHideReadMores() {}</script>
<b:else/>
<style>span.fullpost {display:none;}</style>
<script>
function tbgHideReadMores() {
var els = document.getElementsByTagName(&#39;*&#39;);
for (i = 0; i &lt; els.length; i++) {
if ((els[i].className == &#39;post-body&#39;) || (els[i].className == &#39;post-body entry-content&#39;)) {
tbgHideReadMore(els[i])
}
}
}

function tbgHideReadMore(post) {
var spans = post.getElementsByTagName(&#39;span&#39;);
var found = 0;
for (var i = 0; i &lt; spans.length; i++) {
if (spans[i].className == &quot;fullpost&quot;) {
spans[i].style.display = &#39;none&#39;;
found = 1;
}
}

var lnks = post.getElementsByTagName(&#39;a&#39;);
for (var i = 0; i &lt; lnks.length; i++) {
if ((lnks[i].innerHTML == &quot;Read More&quot;) &amp;&amp; (found == 0)){
lnks[i].style.display = &#39;none&#39;;
}
}
}
</script>
</b:if>

</head>

3) Locate the <body> tag and modify it as shown below.

<body onload='tbgHideReadMores()'>

4) Locate the <data:post.body/> element and add the code shown in red below.

<div class='post-body entry-content'>
<p><data:post.body/>
<b:if cond='data:blog.pageType != "item"'><br/>
<a expr:href='data:post.url'>Read More</a>
</b:if>

</p>

5) Then for each post that you want to display a summary, you have to add the following piece of code enclosing the part that you want to hide. (Do this from the Edit Html tab of the post editor)

This is a sample long post. Only these two lines are visible on the homepage.

<span class="fullpost">This sentence, which is enclosed inside the HTML code
shown in red, will be displayed only when a visitor clicks on the Read More
link.</span>


Notes:
  • Instead of "Read More", if you want some other phrase such as "Continue...", then you have to put that exact string in the places in which "Read More" appears in steps (2) and (4).
  • The unnecessary Read More links get hidden only after the page is fully loaded. So you might see them initially, until the home page gets fully loaded in the browser.

Sunday, August 2, 2009

Fluctuations in AdSense Earnings

The AdSense earnings can vary from as few as two to three cents per click to as much as one dollar per click. These fluctuations are quite normal and are usually the result of one or more of the following reasons.

  • Drop in ad impressions due to reduced traffic or page views
  • Drop in the click-through-rate (or CTR) - A CTR of 1% to 4% is considered normal but I have seen days where it drops to as low as 0.5%
  • Lack of relevant contextual ads for the content of the pages - low relevancy would mean that AdSense would serve low paying ads
  • Reduction in advertising budgets of advertisers
  • Seasonal variations - for example, festive seasons may attract bigger advertising budgets and therefore there will be higher cost-per-clicks (CPC)
The advertisers seem to bid higher on the beginning and in the middle of a month. But, CPC seem to drop towards the end of the month, probably because advertisers run out of gas.

Further Reading: