How to Cloak a Link with Javascript

Filed Under (Affiliate Marketing, Web Development) by admin on 18-05-2008

Tagged Under : , ,

Cloaking your links is a must for affiliate marketers. What does this mean? It means that when someone puts their cursor over one of your links, instead of showing some long, ugly affiliate link (i.e. www.jkadl.com/jafj10402kljafdkla/lskjfa1) it can show whatever you want (i.e. www.greedbetweenthelines.com). Why do you want to do this? So not everyone in the world knows that it’s an affiliate link. Most affiliate marketers are still going to know it’s an affiliate link that has been cloaked, but the majority of ordinary users won’t have a clue. Some people don’t want to use your affiliate link (for whatever reason they may have), or they see that crazy-looking link when they mouseover and decide not to click on it.

My suggestion in choosing what to make your link say, is to use something believable.  You want to make people think that they are clicking on a “legitimate” link.  That’s the whole reason for doing this.  If I were you, I wouldn’t make it say something like, “Please Click This Link Now.”  That is just asking for the opposite. It’s going to look fishy and spammy, and therefore likely no one except the absolute noobiest net noob is going to click on it.  Don’t underestimate the intelligence that the general internet population has these days.

So anyway…. Here’s one way to cloak your links:

Type the following code into your HTML. It goes in your link code right after the ‘<a’ and right before the ‘href=’

onmouseover=”window.status=’http://www.greedbetweenthelines.com’; return true;” onmouseout=”window.status=”; return true;”

So your code should look like: ‘< a onmouseover=”window.status=’http://www.greedbetweenthelines.com’; return true;” onmouseout=”window.status=”; return true;” href=”http://www.youraffiliatelink.com/subid/subid” mce_href=”http://www.youraffiliatelink.com/subid/subid”>Anchor Text< / a >

So there you go. Take it and make it work.

Leave a Reply