Do you cloak your affiliate links? If not, then you may be giving dishonest people easy access to steal your affiliate commissions.

You must understand that link cloaking is much like locking your door - it only keeps the honest people honest. If someone is determined to use their own affiliate link instead of yours, you can’t really stop them… but link cloaking can make it much harder for them.

When you get an affiliate link (whether from Clickbank, Commission Junction, or some other affiliate program), your link looks something like this:

http://mquarles.coolsoftware.hop.clickbank.net

or this:

http://www.coolsoftwareforsale.com/?id=1234

Anyone who knows about the affiliate program you’re using can simply replace your identifier (in this case, mquarles or 1234) with their own:

http://hijacker.coolsoftware.hop.clickbank.net

or

http://www.coolsoftwareforsale.com/?id=6666

and take your commission.

There are two main cloaking methods, plus a neat little method for “preloading” your affiliate cookie into your visitor’s browser.

Javascript Link Cloaking

By replacing your link with a small bit of javascript, you can obfuscate your link, and make it much harder for someone to steal your commissions.

Instead of this in your HTML code:

<a href="http://mquarles.coolsoftware.hop.clickbank.net">Click Here For Cool Software</a>

you’ll have something like this:

<script type='text/javascript'> ahstr='x3Cx61x20x68x72x65x66x3Dx22x68x74x74x70x3Ax2Fx2Fx6Dx71x75x61x72x6Cx65
x73x2Ex63x6Fx6Fx6Cx73x6Fx66x74x77x61x72x65x2Ex68x6Fx70x2Ex63x6Cx69x63x6Bx62
x61x6Ex6Bx2Ex6Ex65x74x22x20x6Fx6Ex4Dx6Fx75x73x65x6Fx76x65x72x3Dx22x77x69
x6Ex64x6Fx77x2Ex73x74x61x74x75x73x3Dx27x43x6Fx6Fx6Cx20x53x6Fx66x74x77x61x72
x65x27x3Bx20x72x65x74x75x72x6Ex20x74x72x75x65x3Bx22x20x6Fx6Ex4Dx6Fx75x73x65
x6Fx75x74x3Dx22x77x69x6Ex64x6Fx77x2Ex73x74x61x74x75x73x3Dx27x20x27x3Bx20x72
x65x74x75x72x6Ex20x74x72x75x65x3Bx22x20x74x61x72x67x65x74x3Dx22x5Fx6Ex65x77
x22x3Ex43x6Cx69x63x6Bx20x48x65x72x65x20x66x6Fx72x20x43x6Fx6Fx6Cx20x53x6Fx66
x74x77x61x72x65x3Cx2Fx61x3E';
document.write(unescape(ahstr.replace(/x/g,'%')));
</script>

With this obfuscated code, you can modify the status bar so that it does not reveal your affiliate link either, using the onMouseOver event.

The benefit of using javascript cloaking is that if you have tool to do the conversion for you (such as my Affiliate Link Cloaking tool), it is extremely easy to implement and does not take a lot of advanced knowledge. Instead of using your regular link, you simply substitute the javascript.

The downside is that the code can only be used on a web page, or in a compiled ebook. You can’t use this code in an email message or in an article that you have written.

Redirect Link Cloaking

Redirect Link Cloaking is more powerful than Javascript link cloaking, but it can be a bit harder to implement. To accomplish redirect cloaking, you need to set up a page on your own website that automatically redirects to your affiliate link. You can do this with javascript, a meta refresh, or server-side code (such as Perl or PHP).

Here’s an example:

Let’s say I wanted to promote http://mquarles.coolsoftware.hop.clickbank.net, but I don’t want people replacing my affiliate id with their own. I can set up a page on my website (say, http://marcquarles.com/cool_software). That page would contain a redirect to my actual affiliate URL. Here’s an example using PHP:

<?PHP
header("Location:http://mquarles.coolsoftware.hop.clickbank.net");
?>

Once I have this in place, anytime someone goes to http://marcquarles.com/cool_software, they will be automatically redirected to my affiliate link. Now I can safely promote http://marcquarles.com/cool_software in articles, ebooks, via email, or however I want.

I prefer this affiliate link cloaking method because it can be used not only on web pages and ebooks, but also in emails and even in articles that you have written and are syndicating.

The downside is that you must have a website of your own to host the redirect.. and you must understand how to implement the redirect. What’s more, if the domain name you are hosting the redirect page on ever expires or you lose control of it, you’ve lost that income source as well.

Cookie Preloading

Let’s say JimBob finds himself on your website, and you’re doing a really nice presell of coolsoftwareforsale.com. JimBob is excited, and is really interested, so he opens a new browser window and types in www.coolsoftwareforsale.com, reads the sales letter, and buys it. Uh-oh - you just lost a commission. Because JimBob didn’t actually click your link, you don’t get credit for the sale, even though you’re responsible for it.

Even worse, what if your presell gets him ready to buy, but he just doesn’t have time to read the sales letter, so he writes down www.coolsoftwareforsale.com on his handy-dandy post-it note and sticks it to his monitor for later. The next day, he types coolsoftwareforsale.com into his browser, and buys. Once again, because he did not click your link, you don’t get credit for the sale.

What if JimBob doesn’t buy now, and doesn’t write the URL onto a post-it? Instead he just remembers “cool software for sale”, and types that into Google a few days later. Google gives him the site, and he goes and buys, based on your presell… but you don’t get credit because he didn’t click your affiliate link.

Cookie preloading is the process where you cookie his browser while he is on your site, so in any of the three situations above, you still receive credit for the sale.

Cookie preloading is accomplished by opening an invisible frame or iframe into the visitor’s browser and loading your affiliate link into that frame. Thus, the visitor gets cookied, and if he buys the product later, you’ll still get the credit for the sale (as well you should, since you presold him in the first place.)

Cookie preloading only works with affiliate programs that use cookies, and some affiliate programs prohibit certain types of cookie preloading, so you should get familiar with the rules of the affiliate program you are promoting.

Here’s an example of cookie preloading in action:

<iframe src="http://mquarles.coolsoftware.hop.clickbank.net" height="1" width="1" frameborder="0"></iframe>

I can place this code anywhere on my page, it will be practically invisible (1 pixel by 1 pixel in size), and will load my affiliate cookie on just about every browser that visits that page. If JimBob, for whatever reason, does not click my affiliate link during this session, I’ll still get the affiliate commission if he buys later on.

If you’re doing affiliate marketing, you simply must use some form of link cloaking and cookie preloading in order to maximize your profits. If you’re not, you’re leaving money on the table every single month.

Members of my list got a free copy of my Affiliate Link Cloaking Tool - including Master Resale Rights… if you’re not a member of my list yet, sign up right now:
http://marcquarles.com/email-updates