How to Cloak or Mask your Affiliate Link for Bloggers

author photo

Advertisement
Ever heard of link cloaking or masking, what's cloaking all about, wondering what it does, well this article will show you how you can cloak any of your affiliate link. 

I run my affiliate links through link cloaking, we know that some affiliate link are impossible to remember, so redirecting allow you to create a better and short link that will be easy for you to remember. 

But if you copy the link and paste it in another tap, the link won't work.
link cloaking
Link Cloaking
The reason we cloak affiliate link is to protect our affiliate commission.  It protects your affiliate commissions by making the affiliate ID less visible and makes the link more appealing to visitors.  

If a visitor clicks on the affiliate link everything stays on my site until the last minute when they have to be redirected to the original web page. In doing this, there’s less chance for my commissions to be stolen if you were to purchase some hosting from this website, with the URL shorten you can have a click count rate about your affiliate link, which redirect to the original link.

The affiliate marketing world is a very competitive place to set up a business.

WHAT LINKS CLOAKING?
Link Cloaking mean masking the affiliate link URL given to you by the affiliate program and making the affiliate link shorter, this to obfuscate your affiliate ID and make the link shorter.

For example
This is my affiliate link for socialpilot before cloaking the link;
https://www.socialpilot.co?fp_ref=affiliate url dftd2e565

This is my affiliate link for socialpilot after cloaking the link: https://www.techvocast.com/go/socailpilot

The affiliate link above goes to the same web page and still track
affiliate cookies
link cloaking
Link cloaking
The Benefits Of Link Cloaking
As we have said earlier before, the benefit of cloaking your affiliate links is to protect your commissions.

Link Trusted By User And Visitor
Visitor are more likely to click on the link pointing to the same website they are on, than the affiliate link with an ugly face, cloaking affiliate links still leads to increased click-through rate.

By cloaking my affiliate link, I can set what the URL will looks like, so instead of a link to the product page with random numbers and product ID’s that make no sense to my audience, I can change the slug of the URL to match whatever I like.

If the product like is something like this
https://www.socialpilot.co?fp_ref=dfftd2e565

If this URL was cloaked i could say
https://www.techvocast.com/go/socialpilot and the link will still lead to the product page. As an affiliate marketer, you will have a lot of links to cloak.

Cloaking your affiliate links in wordpress is done with the help of an affiliate link management plugin, like ThirstyAffiliates and prettyLink. that gives you many other side benefits. But we ain't taking about the wordpress plugin, this tutorial is about blogger on how they can implement the jquery code for the link cloaking to work, you should have know that they is no such plugin or widget for blogger blog so today I will teach you, how to cloak your affiliate link in blogger blog

HOW TO CLOAKED YOUR AFFILIATE LINKS
Cloak your link with simple and easy code,
With a little short of Jquery code you can be able to cloak your link

Go to your theme section click edit and tap anywhere then tap CTRL F your search box pop up and search for the closing head 
     
 Then copy and paste the below Jquery just above the closing head on your blogger Blogspot template
              
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js' type='text/javascript'></script>             <script type='text/javascript'>var aff = new Array();
/* define your links here */aff['Your affiliate Link1'] = 'example.com/out/affiliate-name';
aff['Your affiliate Link2'] = 'example.com/out/affiliate-name';
aff['Your affiliate Link3'] = 'example.com/out/affiliate-name';
aff['Your affiliate Link4'] = 'example.com/out/affiliate-name';
aff['Your affiliate Link5'] = 'example.com/out/affiliate-name';
/* 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>
Edit the Jquery code

In the above code, find aff[‘Your affiliate Link1‘] = ‘Your regular Link1‘; and then Replace Your affiliate Link1 with your affiliate link; https://www.socialpilot.co?fp_ref=affiliate url dftd2e565

Replace Your regular Link1 with a simple link https://www.techvocast.com/out/socialpilot

Just like this


aff[‘https://www.socialpilot.co?fp_ref=affiliate url dftd2e565‘] = ‘https://www.techvocast.com/out/socialpilot‘;


when you add the affiliate link https://www.socialpilot.co?fp_ref=affiliate url dftd2e565 on your blogger post page or the html/javascript widget then it be converted into https://www.techvocast.com/out/socialpilot

Remember you must add the original affiliate link for it to work, you can add unlimited link as you want just copy and paste this

aff['Your affiliate Link5'] = 'example.com/out/affiliate-name';

If you have any problem in setting it up comment below and we guide you through. Like this article share with friends.
Advertisement