Summary:
Affiliate link cloaking allows you to hide the affiliate nature of the link, you promote, and prevents its modification, which otherwise may result in a loss of the affiliate commission.
Name of the pattern:
Affiliate Link Cloaking
When to use the pattern:
When you want to prevent modification of your affiliate links, hide affiliate nature of your links or, even, replace the sales letter with your own version.
How to use the pattern:
There are three ways to do affiliate link cloacking.
1. Redirect.
2. Frame.
3. IFrame/Object replacing the sales letter for ClickBank-like affiliate programs.
Redirect
To cloak link with redirect, you put a simple HTML or PHP page on your own site, usually into a special folder, for example, /recommends. That file contains immediate redirection to your actual affiliate link. Afterward you promote the link to this redirect page instead of your affiliate link. It works the same way, but instead of
http://yourId.vendorId.hop.clickbank.net your prospects see something like
http://www.YourSite.com/recommends/program.php, which looks much better.
To use redirect, either put simple PHP file per affiliate program you promote or a simple HTML file. I prefer to use PHP files, but HTML will work fine too. Redirect only allow to hide the affiliate links, the rest of the process works as usual.
Example of PHP file:
<?php
header("Location: YourAffiliateLink");
exit();
?>
Example of HTML file:
<html><head><meta http-equiv="Refresh" content="0; url=YourAffiliateLink"></head><body></body></html>
The number after 'content=' is a number of seconds to delay before redirecting. It's usually set to 0 (immediate redirect), but you may use it to splash your logo or message before taking them to the vendor site.
Using frame
Using frames allows to not only hide your affiliate link, but also make it look like the whole vendor sales letter is actually located on your site. Some people consider it cool and worth the trouble. Technically, it's done also by putting a very simple HTML file on your site about the same way as for redirected links, only instead of redirection, it shows vendor's sales letter in a frame.
Example of HTML file for framing vendor sales letter:
<html>
<head><title>Put your title and the rest of the header between HEAD tags</title></head>
<frameset rows="*">
<frame src="Your Affiliate Link here" frameborder=no>
</frame>
<noframe>That never happens in modern browsers. Please, upgrade from MS-DOS.</noframe>
</frameset>
</html>
Using frames also allows you to drop the affiliate cookie while completely replacing the vendor sales page with your own. To do so use two frames and put vendor sales letter into a hidden one like that:
<html>
<head><title>Put your title and the rest of the header between HEAD tags</title></head>
<frameset rows="*,1px">
<frame src="yoursalesletter.html" frameborder=no>
</frame>
<frame src="youraffiliatelink" frameborder=no>
</frame>
</frameset>
</html>
Then put yoursalesletter.html with your sales letter into the same folder.
IFrame/Object to replace vendor's sales letter
IFrame/Object affiliate link cloaking is mostly used to completely replace vendor's sales letter (like in Keith Wellman's Easy Sales Formula) but still get affiliate cookie dropped on the visitor's computer. IFrame tag is the older way now officially replaced by the standard Object tag, but both will work.
Here is an example how to do that with IFrame:
...<h1>Your sales letter here</h1>
...
<iframe src="your affiliate link here" name="something" scrolling="no" frameborder="no"
align="left" height = "1px" width = "1px">
</iframe>
Or use Object tag:
<object data="your affiliate link here" type="text/html" height = "1px" width = "1px">
</iframe>
Attribution:
Not sure. The technical part is pretty evident once you get into your head that the links should be cloaked.
Related patterns:
Affiliate program, CPA
Related anti-patterns:
None
Details and comments:
Keep in mind, of course, that if the customer has an impression that he bought the product from your site, that's where he will come if he has problems with the product. Also, some vendors may have objections to that kind of cloaking.
Notice also that cloaked link still cannot be used for PPC advertising with AdWords, and pages with redirect links ares still at risk being considered "bridge pages". Here is a quote from current Google definition for those:
# Bridge pages: Pages that act as an intermediary, whose sole purpose is to link or redirect traffic to the parent company
# Mirror pages: Pages that replicate the look and feel of a parent site; your site should not mirror (be similar or nearly identical in appearance to) your parent company's or any other advertiser's site
Both types of pages are considered bad by Google and they are essentially banned from either PPC/AdWords advertising or ever being ranked well. There is information that Google lately (August 2009) made that even more restrictive, making much more pages with affiliate links considered a "bridge" page with matching penalties, which affected review sites (page with review of the product and affiliate link or site with such pages).