Cloak Affiliate Links on Blogspot / Blogger Platform

Cloak Affiliate Links on Blogspot / Blogger Platform. Affiliate link cloaking method in Blogger. How to cloak affiliate links on Blogspot / Blogger platform?

In this article, we are going to tell you that Blogspot blog can be affiliate with cloaking or How to Cloak Affiliate Link in Blogger.com Blogs. Many times it has happened that bloggers who are created on the Blogspot platform, keep asking if Blogspot Blog is affiliated to market. So in this post I have included answers to some of the same questions. By which the blogspot user is clear whether or not it is safe! If there is no problem then how to get affiliated marketing without search engine penalty. So you can also overcome your confusion, by reading about Affiliate link cloaking.

How to cloak affiliate links on Blogspot / Blogger platform?

This post proved very helpful for those who want to make money from an affiliate program by making their site on Blogger. Because affiliate link cloaking is a method that lets you hide the promotion link of your affiliated program for url masking for search engine. I mean you can hide affiliate links by link masking

Affiliate link cloaking method in Blogger.

First of all, we should say thank you to ragepank who made such a code for all of us bloggers who have also made Affiliate link cloaking possible on blogspot.

Step- 1. First, copy and paste the Jquery code given below into your template before </head>
.
 <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js' type='text/javascript'></script>  

Step- 2. Now once again paste the code below by copying it before </head> in your blogger template.
 <script>  
 var aff = new Array();  
 /* define your links here */  
 aff['Your affiliate Link1'] = 'Your regular Link1';  
 aff['Your affiliate Link2'] = 'Your regular Link2';  
 aff['Your affiliate Link3'] = 'Your regular Link3';  
 aff['Your affiliate Link4'] = 'Your regular Link4';  
 aff['Your affiliate Link5'] = 'Your regular Link5';  
 aff['Your affiliate Link6'] = 'Your regular Link6';  
 aff['Your affiliate Link'] = 'Your regular Link7';  
 aff['Your affiliate Link3'] = 'Your regular Link8';  
 /* do not edit below this point */  
 /* reverse the key/value pairs so we can lookup based on value */  
 var aff_reverse = new Array();  
 for (k in aff) {  
 aff_reverse[aff[k]] = k;  
 }  
 /* scan all links when the document loads */  
 $(document).ready(function(){  
 $('a').attr('href',function(){  
 /* if the link isn't listed above, do nothing */  
 if (!aff[$(this).attr('href')]) {return $(this).attr('href');}  
 /* ok, the link is in our list */  
 $(this).click(function(){  
 /* when the link is clicked on, revert it back to the affiliate link */  
 //$(this).attr('href', aff_reverse[$(this).attr('href')]);  
 return true;  
 });  
 $(this).mouseup(function(){  
 /* Firefox ignores onclick event when the link is opened via middle mouse (new tab) */  
 $(this).attr('href', aff_reverse[$(this).attr('href')]);  
 return true;  
 });  
 $(this).mouseout(function(){  
 /* revert back to non-aff link in case they opened in new tab */  
 $(this).attr('href', aff[$(this).attr('href')]);  
 return true;  
 });  
 /* change the affiliate link to a non-affiliate link */  
 return aff[$(this).attr('href')];  
 });  
 });  
 </script>  

  1. Customization: In your line number five, replace your affiliate Link1 with your affiliated program link, which you have to cloak or mask. And place your Brand link in place of Your regular Link1, on which visitors should redirect.
  2. Affiliate link Example: http://godaddy.com/product188181id=howtolearnblog
  3. Brand link Example: http:/howtolearnblog.com/go/godaddy (You can enter your blog URL instead of bloglon.com and can also refer to Go Recommended, Out or Reference).
  4. Save the code by clicking on the Save template.

Now I think that you may have understood that Blogger Blog is affiliate link closing. If you still want to ask a question related to Affiliate link cloaking, then you can ask us with the help of comment. If this tutorial is helpful to you, do not forget to share it with your friends on social media. Thanks!

Powered by Blogger.