AdBlock To Take Over The Internet?

March 12th, 2010

If you frequent technology news sites, it’s easy to get the impression that AdBlock Plus – the popular Firefox extension that can block most forms of online advertising – is a big deal. Any news article, blog post or forum thread that happens to mention advertising will inevitably get several comments expounding the benefits of AdBlock. Even seemingly unrelated topics will often get that treatment : Web pages loading too slowly? Use AdBlock. Worried about privacy? AdBlock. Unsure which web browser to choose? Get the one that can run AdBlock.

With all this commotion and ad-blocker evangelizing going on, one has to wonder – is AdBlock on the way to becoming the norm, and thus completely devaluing online advertising?

No. Not even close.

I’ve run the numbers. If current Internet usage trends persist, people who use AdBlock Plus (and other ad-blocking plugins) will always be a tiny minority. Sure, it might have some impact on the ad revenue of websites that target the tech-savvy crowd. But advertisers in general will probably always see AdBlock as just a minor annoyance – if that.

See the stats below.

AdBlock Plus Popularity

By last count, there were ~1,734 million Internet users in the world. AdBlock Plus, the most popular ad-blocking plugin, has ~10 million active users. Thus, only about 0.6% of all Internet users have AdBlock installed.

Growth Rates

In the last two years, the number of Internet users has been increasing by about 19.7 million each month, and this growth is accelerating. I wasn’t able to find complete historical data for AdBlock Plus, but judging by these stats (see the monthly view) the number of AdBlock users is currently increasing by about 315 thousand per month. And it seems to be slowing down lately.

With a growth rate disparity this huge, AdBlock will never catch up.

Sources : InternetWorldStats.com, AdBlock Plus usage statistics


Showing Different Ads To Different Visitors

March 9th, 2010

Just today, I decided to run an impromptu experiment to test if visitors who come from search engines are really more likely to click on ads. It’s considered  ”common knowledge” by many bloggers who advise everyone to only show ads to search engine visitors (as a quick Google search will illustrate), but my own AdSense stats made me doubt that particular piece of advice. Hence the experiment.

So how does one show different ads to different visitors? Normally you could use the excellent Who Sees Ads plugin, but that doesn’t work for my site. I’m using the WP-SuperCache caching plugin which is incompatible with Who Sees Ads.

Instead, I wrote a JavaScript function that can analyse the HTTP referrer to distinguish between four types of visitors :

  • People who accessed your page directly, e.g. by typing in the URL (no referrer).
  • People who clicked an internal link to access the page (referrer from the same domain).
  • Search engine visitors; people who arrived via Google or Yahoo! (referrer matches one of the most popular search engines).
  • External visitors. This is basically a catch-all category for everyone who found your link on a third-party site that’s not a search engine. For example, this would include external forums and web directories.

Here’s the script :

function get_referrer_type(){
	var ref = document.referrer;
 
	if ( ref.length == 0 ){
		return 'none';
	}
 
	function getHostname(str) {
		var re = /^(?:f|ht)tp(?:s)?\:\/\/([^\/]+)/im;
		var matches = str.match( re );
		if ( matches ){
			return matches[1].toString();
		}
		return '';
	}
	if ( getHostname(ref) == document.location.host ){
		return 'internal';
	}
 
	var SE = ['/search?', '.google.', 'web.info.com', 'search.', 
		'del.icio.us/search', 'soso.com', '/search/', '.yahoo.',
		'.ask.'];
	for ( var source in SE){
		if (ref.indexOf(SE[source]) !=-1) {
			return 'search';
		}
	}
 
	return 'external';
}

The function get_referrer_type() returns one of “none”, “internal”, “search” or “external” based on the referrer info.

And here’s the script that I used to show different  AdSense ads to different people :

function get_top_adsense_ad(){
	var default_slot = '1111111111';
	var code = '<'+'script type="text/javascript"><!--\ngoogle_ad_client = "pub-0000000000000000";google_ad_slot = "%ad_slot%";google_ad_width = 336;google_ad_height = 280;\n//--><'+'/script><'+'script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></'+'script>';
	var slots = {
		'none' : '2222222222',
		'internal' : '3333333333',
		'external' : '4444444444',
		'search' : '5555555555',
	};
 
	var ref_type = get_referrer_type();
	if ( typeof(slots[ref_type]) != 'undefined' ){
		code = code.replace('%ad_slot%', slots[ref_type]);
	} else {
		code = code.replace('%ad_slot%', default_slot);
	}
 
	return code;
}
 
document.write(get_top_adsense_ad());

Unlike get_referrer_type(), this script is optimized for my site/AdSense account. Don’t try using it without modification ;) If you want to use it, replace “pub-XXXXXXXX”, the ad slot IDs and ad width/height settings with your own values (you can find them in your AdSense ad code).

As for the experiment, I’ll post the results sometime next week.


12 Invisible But Invaluable jQuery Plugins

March 5th, 2010

Not all jQuery plugins are about UI and eye-candy. There’s also a class of plugins that aim to make web development itself easier, either by acting as convenient wrappers around hard-to-use JavaScript functionality, simplifying cross-browser compatibility, or providing small but useful utilities and APIs.

Below you’ll find a list of 12 great utility-style jQuery plugins. While invisible to the user, they can be invaluable to the developer.

1. Hotkeys

The HotKeys plugin makes it very easy to hook almost any key or key combination. Great for adding keyboard shortcuts to your web-app.

2. Mouse Wheel

Detect when the user scrolls the mouse wheel. Note : In theory, the plugin supports all major browsers. However, the current version may report inconsistent scroll deltas in different browsers.

3. XML to JSON

XML to JSON lets you convert XML documents to JSON. Handy if you find plain JS objects easier to use than the XML DOM, or if you’re building a mashup with heterogeneous data coming in from a bunch of APIs and you want to convert it all to JSON for simplicity.

4. URL Parser

jQuery URL parser processes URLs and provides you with easy access to info about their components – the protocol, host, path, query string, and so on. On top of that, it also has some neat extra features, like the ability access query parameter values by parameter name.

5. Taconite

With Taconite, you can update multiple DOM elements with a single AJAX request. This can considerably simplify your client-side code and helps cut down on bandwidth use.

6. AJAX Manager

Queue, order, abort, block, cache and otherwise manipulate your AJAX requests with the AJAX manager plugin.

7. Calculation

The jQuery Calculation Plugin lets you extract numeric data from HTML elements and apply a number of common mathematical operations to the results. It includes typical aggregation functions like sum(), avg(), min() and max() and also lets you define your own equations.

8. Freeze/Unfreeze Events

This mini-plugin can be used to temporarily stop all jQuery events assigned to a specific element (or a group of elements) from firing.

9. Cookie Handling

When it comes to cookies, there are two jQuery plugins that stand out :

  • Cookie is simple and light-weight. Just the bare essentials  – you can read/write/delete cookies, and that’s it.
  • Cookies is the advanced option. It can filter cookies using regexps, test if the browser is set to accept cookies, bind DOM element contents to cookies, and do automatic JSON serialization.

10. Metadata

The Metadata plugin provides a unified way to extract different formats of metadata from the DOM. It can extract metadata from classes, attributes, child elements or HTML5 data- attributes.

11. Navigation History For AJAX Pages

Add the coveted back-button support to your AJAX apps with the powerful Address plugin. There’s a number of other plugins that deal with #anchor-based navigation, but Address is a clear winner – it has the cleanest API and the best documentation.

12. Timers

jQuery Timers provides a more elegant, jQuery-flavoured way to deal with setTimetout() and setInterval(). You can apply timers to DOM elements, set the number of times a given timer will execute, create named timers, and more.


Add Fuzzy Timestamps To Your Blog

March 2nd, 2010

I recently stumbled upon a great jQuery plugin called “timeago” that lets you easily create fuzzy timestamps (e.g. “5 minutes ago”, “about 2 months ago”, etc). So I wrote a quickie WP plugin that you can use to add this neat feature to your blog.
About
Basically, with this plugin you [...] Continue Reading…


Anti-Procrastination Techniques Review

February 26th, 2010

There’s an interesting post/survey combo up on LessWrong.com that discusses the effectiveness of various techniques for defeating procrastination and akrasia. At the moment it lists more than 20 different tactics, ranked based on the feedback of the people who have actually tried them. Go check it out.

Here’s a quick [...] Continue Reading…