Deprecated: Assigning the return value of new by reference is deprecated in /home/gathadam/public_html/wp-settings.php on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /home/gathadam/public_html/wp-settings.php on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /home/gathadam/public_html/wp-settings.php on line 542

Deprecated: Assigning the return value of new by reference is deprecated in /home/gathadam/public_html/wp-settings.php on line 578

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/gathadam/public_html/wp-settings.php on line 18
Making Money

We Got Domain - over 10,000 aged domains for sale

We Got Domain is a quick site that I built to make buying domains from forums like dnforum, digitalpoint etc easier. It extracts domain names from the sale threads and then finds out extra info like Backlinks, Pagerank, Creation date etc. Domains can only be bought on the forums so hopefully We Got Domain will save time for people buying domains while driving extra traffic to the forums (and they get tons of do-follow links as a small bonus).

The site was partly inspired by a the post Purchasing Domains on EarnersBlog.com as well as Shoemoney Marketplace and bizmp.com

I hope you find the site useful - send me an email if you have any suggestions or improvements.

AGLOCO goes belly up

I just got this email.

Dear Gath,

We would like to update you on the status of AGLOCO’s operations. We continue to believe in the AGLOCO concept, but our revenue is currently not sufficient to give Members a meaningful distribution. And though there are increases in membership, the resulting revenue is not enough to support operating costs. As a development team we are unable to continue to use our savings to fund the operations. If any Member would like to pursue continuing the operations of AGLOCO, you may contact us at agloco1@live.com .

We would like to thank every Member for supporting our effort to bring a piece of the Internet directly to the user. We hope that we can find a way to keep the operations going.

AGLOCO Development Team

So, it looks like all the people who said ‘If it seems too good to be true….’ were right. Looks like I’m going to cancel my order for the ferrari.

Code the perfect Exit Popup (exit console)

All popups are bad news, right? Nothing gets rid of visitors faster than a crappy ad for casinoviagraporn getting in their face.

But what about visitors that found your site through a search engine, spend 5 seconds on 1 page of your site & then press the back button?

They didn’t find what they want.
They aren’t coming back.
Don’t they deserve some popup love?

Seriously, you have (most likely) lost these visitors for good anyway, so showing them a popup won’t make much difference to your visitor retention.

So how do you do it?
The key is the javascript event onUnload. This fires when a page is exited, whether by navigating out via a link, pressing the back button or closing the browser. The problem is, it fires every time a page unloads - and we only want a popup when the visitor leaves your site (not every time they navigate to a new page on your site).

Over at consolescripts.com they describe a solution which involves adding an onClick event to every internal link. The onClick event effectively blocks the popup from firing within the onUnload event.

Its a good solution, but finding every internal link within a decent sized site is a nightmare. So we need an automatic way of adding the onClick event to internal links, and it must not overwrite any existing onClick events we have already set up (unobtrusive javascript).

Check this out:


var Page_Enter;
var TimeLimit=20;
var Page_ShowPopOnExit=false;
var MySiteDomain='YOURSITE.COM';

function XBrowserAddHandlerPops(target,eventName,handlerName) {
  if ( target.addEventListener ) {
    target.addEventListener(eventName, function(e){target[handlerName](e);}, false);
  } else if ( target.attachEvent ) {
    target.attachEvent("on" + eventName, function(e){target[handlerName](e);});
  } else {
    var originalHandler = target["on" + eventName];
    if ( originalHandler ) {
      target["on" + eventName] = function(e){originalHandler(e);target[handlerName](e);};
    } else {
      target["on" + eventName] = target[handlerName];
    }
  }
}

function InternalLink() {
	Page_ShowPopOnExit = false;
}

function PageEnter() {
   Page_Enter=new Date();
}

function SiteExit() {
   var time_dif;
   var Page_Exit=new Date();
   time_dif=(Page_Exit.getTime()-Page_Enter.getTime())/1000;
   time_dif=Math.round(time_dif);
   if (time_dif<=TimeLimit && Page_ShowPopOnExit==true)
	{
	alert('Here is your popup!');
	}
}

function LinkConvert()
{
var href;
	var anchors = document.getElementsByTagName('a');

	for(var y=0; y<anchors.length; y++)
	{
		href = anchors[y].href.toLowerCase();
		if (!(href.indexOf("http://")!=-1 && href.indexOf(MySiteDomain)==-1))
			{
			anchors[y].clickhandler=InternalLink
			XBrowserAddHandlerPops(anchors[y],"click","clickhandler");
			}
	}
}

XBrowserAddHandlerPops(window,"load","PageEnter");
XBrowserAddHandlerPops(window,"load","LinkConvert");
XBrowserAddHandlerPops(window,"unload","SiteExit");
Page_ShowPopOnExit=true;

Save this as popup.js

The javascript does a few things.

  1. As soon as the page is finished loading a copy of the time is stored, so we can tell how long they have been on the page.
  2. All internal links have an onClick event handler added. An internal link is determined as one is missing ‘http://’ (internal relative links do not have the http:// ) and your domain name in the href. Note: If you are using javascript links for internal navigation then this method will not work. However, it should be easy to add the ‘Page_ShowPopOnExit = false;’ to your javascript link code.
  3. When the page unloads 2 checks are done; Has the person left the page within XX seconds? (if they stay 5 minutes then perhaps they liked your site, so no popup for them). Is the visitor following an internal link? If the answers are Yes & No respectively, then show them a pop.

Great, but if we just add this .js file to every page on our site then even people who directly type in our URL can be shown pops. These are the hardest of our hardcore fans, and should never get a pop. Also, I only want to show pops to people that hit my site from a search engine & immediately leave - if they visit more than 1 page then no pop for them.

So we need to inspect the Referrer, and check that they are coming from a search engine. I’m going to do this server side so I can cut down on my page size if the visitor is not pop-worthy.

In ASP.Net (put it in the page.load event):


Dim sPageReferrer As String = ""
If Not (Request.UrlReferrer Is Nothing) Then
    sPageReferrer = LCase(Request.UrlReferrer.ToString)
End If
If InStr(sPageReferrer, "google.com") > 0 Or InStr(sPageReferrer, "yahoo.com") > 0 Or InStr(sPageReferrer, "live.com") > 0 Then
    RegisterClientScriptBlock("PopUnder", "<script src='includes/popunder.js' type='text/javascript'></script>")
End If

If you wanted to do this in the .js file, then just change the last bit of popup.js to:


var href = document.referrer.toLowerCase();
if (href.indexOf("google.com")!=-1 || href.indexOf("yahoo.com")!=-1 || href.indexOf("live.com")!=-1)
	{
	XBrowserAddHandlerPops(window,"load","PageEnter");
	XBrowserAddHandlerPops(window,"load","LinkConvert");
	XBrowserAddHandlerPops(window,"unload","SiteExit");
	Page_ShowPopOnExit=true;
	}


How to wrap your Adsense in content for a better CTR

OK, so everyone knows that one of the best places for your Adsense ads is mixed in with your primary content. Even Adsense Help recommends it:

Adsense Help: Where should I place Google ads on my pages?

Here are 2 tips to really mix your Adsense Ads (or YPN) in with the content. The first is dead easy and the second builds on it.

Wrapping text to the right of your Ad block.

To get this:

Just use this:

<div style=’width:400px’>
<div style=’float:left;margin-right:5px’>
– Your Adsense Code –
</div>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi nisl. Curabitur euismod sagittis augue. Maecenas eget mi sed nisi pharetra faucibus. Duis consectetuer eros nec enim. Proin egestas luctus odio. Cras tellus lorem, porttitor sit amet, iaculis sit amet, luctus id, nunc. Sed rutrum est nec dolor. Curabitur blandit tempus nunc. Sed felis metus, tempus ac, tempor nec, ornare at, lectus. Donec vitae dolor. Sed lobortis ornare nibh. Morbi felis. Aenean at dolor. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi nisl. Curabitur euismod
</div>

The important bit is the div that wraps around the adsense code:

The ‘float:left’ style will cause the div to go to the left its container, and allow text to wrap around it. The ‘margin-right’ style just adds some space between the ad block and the text so it doesn’t run together and look messy.

OK, super-simple. Next up:

Wrapping text to the right, and above, your ad block

To get this:

Use this:

<div style=’width:400px’>
<div style=’float:left;width:1px;height:50px;’></div>
<div style=’float:left;clear:left;margin-top:10px;margin-right:5px’>
– Your Adsense Code –
</div>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi nisl. Curabitur euismod sagittis augue. Maecenas eget mi sed nisi pharetra faucibus. Duis consectetuer eros nec enim. Proin egestas luctus odio. Cras tellus lorem, porttitor sit amet, iaculis sit amet, luctus id, nunc. Sed rutrum est nec dolor. Curabitur blandit tempus nunc. Sed felis metus, tempus ac, tempor nec, ornare at, lectus. Donec vitae dolor. Sed lobortis ornare nibh. Morbi felis. Aenean at dolor. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi nisl. Curabitur euismod
</div>

Again, floats are used. This time we are also using a another div to ‘push’ the wrapper div down the page.

<div style=’float:left;width:1px;height:50px;’></div>

This is the div that pushes the wrapper div down


<div style=’float:left;clear:left;margin-top:10px;margin-right:5px’>

This is the div that wraps around your adsense code. Note the ‘clear:left’, that makes the second div go under the first, rather than next to it. The ‘margin-top:10px’ was added because the text at the top of the ad was getting mixed in with it otherwise.

Done!