All methods of Affiliate Link Cloaking

We continue this comprehensive overview about all easy-to-understand and easy-to-use "Affiliate Link Cloaking" strategies. There will be more parts then have been planned before. In this Part II you will learn about Framebreaker and I will introduce "Cookie Dropping"/"Cookie Stuffing". Remember: Whatever you do, it is in your responsibility.

This blog post is a follow-up of Affiliate Link Cloaking - Part I. Please read it first, before you continue.

Recently I found a shop for car tires and used Internet Explorer 7. As it was not possible to add the selected product to the shopping basket, I wondered and checked the source code of the page. This shop was integrated with an iframe into the page. I got no error message from the shop. Each time I switched to the shopping basket, it was empty. Because cookie can't be dropped. Very bad for Affiliate. Why?

IE7 prevents Affiliates from getting commissions if they open merchant's website in frames or iframes

Cookies dropped by a merchant's page that is loaded into a frame or iframe are third-party cookies. Third-party cookies are cookies dropped from other domains. If you open a website within a frame/an iframe, this website is from third party. Those merchant's pages cannot drop cookies in latest IE7. Affiliates are wondering about decreasing commissions, but many of them are definitely not aware of the fact that deployment of P3P Privacy Policies in their website is absolutely necessary. At the end they don't even notice it, because commissions from visitors using Firefox are credited.

Framebreaker and introducing Cookie dropping/Cookie stuffing

Very often you can read about "Cookie dropping"/"Cookie stuffing". It means that Affiliates drop cookies onto visitors' browsers via merchant's website to get commission, if visitors order in 7, 30, 60... return days. Even worse if you as Affiliate already had set a cookie (via your merchants website), it will be overwritten. Normally a cookie would only be set after visitor's click on Affiliate link by loading targeted websites of merchant.

Caught with Cookie dropping

Also in 2008 some merchants complained about this unfair method, e. g. a German Social Bookmarking website was caught red-handed with Cookie dropping via iframes. Each time I read a complaint of a merchant I grinned from ear to ear, because I was wondering why merchants do not use a Framebreaker at their pages to stop Affiliate beginners. Framebreakers are very easy to understand. The page breaks out of the frame and opens in main window. Even more I wonder why they do not use it, because it works with IE7, FF2 and FF3. And it works with opening a website within a frameset AND opening a website within an iframe.

Framebreaker JavaScript code and Testing

<script language="Javascript">
if (top.location != self.location) {
top.location = self.location.href

Let's test this Framebreaker with Frameset and iframe...

I have already prepared the files, but let me explain first. In this you find six HTML files:

Framebreaker Test filesTwo of them to test Frameset without and with Framebreaker, two files for testing iframe without and with Framebreaker and two files that simulate the target page you load with your Affiliate link.

First test: Frameset without framebreaker

Click "1-Test_Frameset-without-framebreaker.htm" and the included code for Frameset will load "target-page-without-framebreaker.htm" into its main frame.

As you see the title of your page is visible at the target page that means the target page is shown in your frameset as mentioned in Part I of this post. (Remember "Source code cannot be viewed as usual, but..." from last post.)

Second test: Frameset with framebreaker

Click "2-Test_Frameset-with-framebreaker.htm" and the included code for Frameset will try to load "target-page-with-framebreaker.htm" into it's Frameset.

As you can see only the title of the target page is visible. The title of your page is invisible. Fail for Affiliate, good for merchant.

Third test: iframe without framebreaker

Click "3-Test_iframe-without-framebreaker-in-target-page.htm" and the included code for iframe will load "target-page-without-framebreaker.htm" into it's iframe.

As you can see the title and content of your page is visible and below the iframe with content. (Frameborder of iframe is switched on to see the iframe.)

Fourth and final test: iframe with framebreaker

Click "4-Test_iframe-with-framebreaker-in-target-page.htm" and the included code for iframe will try to load "target-page-with-framebreaker.htm" into its iframe.

As you can see only the title of the target page is visible. The title of your page is invisible as your page is overruled by merchant's page.

Are iframes really necessary for merchants and Affiliates?

In some niches, e. g. Travel Affiliate Programs (or car tires...), it seems to be barely necessary to work with iframes, because this method is easy-to-use for Affiliate beginners. Of course those merchants would never use Framebreaker. In these niches complete websites are opened within an iframe. As cookies are definitely obsolescent, those merchants must find other methods in future.

An easy-to-use method could be to provide a PHP Scraper... Scraping means to "scratch" content from a website and publish it at your own website in a way that the source code looks like it is your own published data. Search engines cannot detect that this content is scraped (perhaps they detect that it is Double content...). Cookie dropping could be done via calling merchant's server. Details will follow in next post. - There are other already existing methods like Postview-Tracking that is done by Super Affiliates.

Gets tricky?

Not really, but a straightforward tip. Never put this Framebreaker script directly into the source code. Use it as external JavaScript and do not name it framebreaker (!). Let's call it: menu.js. Advanced merchants may obfuscate/encrypt the external JavaScript.

<script src="http://www.domain.tld/scripts/menu.js" type="text/javascript">

If Affiliates beginners use iframes to open a bunch of websites from merchants in 1x1-pixel-iframes (Cookie dropping/Cookie stuffing), then it is strongly recommended for those merchants' websites to use a Framebreaker.

In PART III of this post you will learn about "Cookie Dropping"/"Cookie Stuffing" and you will finally understand what you've always wondered about: the reason why Super Affiliates are to master the rules of Poker. - And you will meet Mrs. Blackhat. She's so much hot and cool and she really loves to date with Super Affiliates.

Of course it will be again extremely interesting. If you want to get informed, then subscribe to this blog's feed! - See you soon at SEM, SEO and SMO at Wulffy's Blog.

Publishing of upcoming blog post is planned at this Saturday.

This blog post Framebreaker - Affiliate Link Cloaking Part II is categorized under Search Engine Optimization, SEO, Web 2.0, Social Media Optimization, SMO, Search Engine Marketing, SEM.



Twain Harte Vacation Rental Guy said...

Do you have a code example of how to create the p3p policy in php. Most of those sites you gave examples to have to much fluff & not enough details on how to just get it done.

I threw on on my site, but I am missing something. I see the xml file, but not the compact part o fit.

SEO Wulffy said...

Hi Craig, go to and check headers of You find in their headers:

p3p: policyref=...



Hope this helps.

Twain Harte Vacation Rental Guy said...

I know what should be in the headers, i am just having trouble properly formatting the actual php code...

Wulffy said...

Hi Craig, thanks for your reply.

I think you find desired information here:

How to Implement P3P HTTP Headers

How to add a P3P compact privacy policy to the http headers for a web site running on an Apache web server and p3p privacy policy links